funcx.sdk.utils package


funcx.sdk.utils.futures module

Tools for dealing with asynchronous execution

Credit: Logan Ward

class funcx.sdk.utils.futures.FuncXFuture(client, task_id: str, ping_interval: float)

Bases: concurrent.futures._base.Future

Utility class for simplifying asynchronous execution in funcX


Stop the execution of the function


Return True if the future is currently executing.

funcx.sdk.utils.throttling module

exception funcx.sdk.utils.throttling.MaxRequestSizeExceeded

Bases: funcx.sdk.utils.throttling.ThrottlingException

exception funcx.sdk.utils.throttling.MaxRequestsExceeded

Bases: funcx.sdk.utils.throttling.ThrottlingException

class funcx.sdk.utils.throttling.ThrottledBaseClient(*args, **kwargs)

Bases: globus_sdk.base.BaseClient

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

throttle_request_size(*request_args, **request_kwargs)
exception funcx.sdk.utils.throttling.ThrottlingException

Bases: Exception

Module contents