Skip to content

Commit

Permalink
revert: remove unnecessary argument
Browse files Browse the repository at this point in the history
  • Loading branch information
iainlomax81 committed Oct 24, 2024
1 parent a009f34 commit 1d77342
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,15 @@ public TResponse Execute<TResponse>(OrganizationRequest request, string username
}

/// <inheritdoc/>
public void WaitForSolutionHistoryRecordsToComplete(ILogger logger)
public void WaitForSolutionHistoryRecordsToComplete()
{
var retryPolicy = Policy
.HandleResult<bool>(hasActiveRecords => hasActiveRecords)
.WaitAndRetryForever(
sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(20),
onRetry: (result, timeSpan) =>
{
logger.LogInformation($"Active records are still present within Solution History. Waiting for {timeSpan.TotalSeconds} seconds before retrying.");
this.logger.LogInformation($"Active records are still present within Solution History. Waiting for {timeSpan.TotalSeconds} seconds before retrying.");
});

retryPolicy.Execute(() =>
Expand All @@ -350,7 +350,7 @@ public void WaitForSolutionHistoryRecordsToComplete(ILogger logger)
}

/// <inheritdoc/>
public ExecuteMultipleResponse ExecuteMultipleSolutionHistoryOperation(IEnumerable<OrganizationRequest> requests, string username, ILogger logger, int? timeout = null)
public ExecuteMultipleResponse ExecuteMultipleSolutionHistoryOperation(IEnumerable<OrganizationRequest> requests, string username, int? timeout = null)
{
ExecuteMultipleResponse executeMultipleRes = null;

Expand All @@ -360,7 +360,7 @@ public ExecuteMultipleResponse ExecuteMultipleSolutionHistoryOperation(IEnumerab
sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(10),
onRetry: (ex, timeSpan) =>
{
this.WaitForSolutionHistoryRecordsToComplete(logger);
this.WaitForSolutionHistoryRecordsToComplete();
});

retryPolicy.Execute(() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,15 @@ public TResponse Execute<TResponse>(OrganizationRequest request, string username
/// <summary>
/// Waits for Solution History records in a <b>Started</b> state to complete.
/// </summary>
/// <param name="logger">Instane of ILogger.</param>
void WaitForSolutionHistoryRecordsToComplete(ILogger logger);
void WaitForSolutionHistoryRecordsToComplete();

/// <summary>
/// Executes multiple requests and performs a check on the Solution History during the operation.
/// </summary>
/// <param name="requests">The collection of <see cref="OrganizationRequest"/> to execute.</param>
/// <param name="username">The user to impersonate.</param>
/// <param name="logger">The <see cref="ILogger"/> instance.</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <returns>Returns an <see cref="ExecuteMultipleResponse"/>. </returns>
ExecuteMultipleResponse ExecuteMultipleSolutionHistoryOperation(IEnumerable<OrganizationRequest> requests, string username, ILogger logger, int? timeout = null);
ExecuteMultipleResponse ExecuteMultipleSolutionHistoryOperation(IEnumerable<OrganizationRequest> requests, string username, int? timeout = null);
}
}

0 comments on commit 1d77342

Please sign in to comment.