Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CancellationToken Parameters to ForceClient #330

Open
ghost opened this issue Dec 19, 2018 · 1 comment
Open

Add CancellationToken Parameters to ForceClient #330

ghost opened this issue Dec 19, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 19, 2018

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.

For example ForceClient.RunJobAndPollAsync:

public async Task<List<BatchResultList>> RunJobAndPollAsync<T>(string objectName, BulkConstants.OperationType operationType, IEnumerable<ISObjectList<T>> recordsLists, CancellationToken cancellationToken = default(CancellationToken))

@ghost
Copy link

ghost commented Nov 21, 2022

Running into this issue as well. Doesn't seem this library is still maintained?

PR is even there: #251 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants