You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the ForceClient functions use async it would be good to pass a CancellationToken so any long running requests can be cancelled. The CancellationToken can be passed through to the ultimate calls on the HttpClient (e.g. HttpClient.PostAsync()).
For example, when running ForceClient functions from Azure Functions a CancellationToken is automatically provided by the infrastructure. If the Azure Functions are shut down or time out then a cancellation is requested by the infrastructure. Hopefully the HttpClient can then gracefully handle cancelling any requests.
As the
ForceClient
functions useasync
it would be good to pass aCancellationToken
so any long running requests can be cancelled. TheCancellationToken
can be passed through to the ultimate calls on theHttpClient
(e.g.HttpClient.PostAsync()
).For example, when running
ForceClient
functions from Azure Functions aCancellationToken
is automatically provided by the infrastructure. If the Azure Functions are shut down or time out then a cancellation is requested by the infrastructure. Hopefully theHttpClient
can then gracefully handle cancelling any requests.For example ForceClient.RunJobAndPollAsync:
public async Task<List<BatchResultList>> RunJobAndPollAsync<T>(string objectName, BulkConstants.OperationType operationType, IEnumerable<ISObjectList<T>> recordsLists, CancellationToken cancellationToken = default(CancellationToken))
The text was updated successfully, but these errors were encountered: