Tools for dealing with asynchronous execution
Credit: Logan Ward
Throttled base client allows for two different types of Throttling. Note, this is ‘polite’ client side throttling, to avoid well intentioned users from mistakenly harming the funcX service, this does not prevent DOS attacks.
Request Flood Throttling: Restricts the number of requests that can be made in a given time period, and raises an exception when that has been exceeded
Request Size Throttling: Restricts the size of the payload that can be sent to the FuncX web service.
Both of these raise exceptions when the values have been exceeded. Both can be caught with ThrottlingException. Throttling can also be turned off with:
cli.throttling_enabled = False