Undocumented
Method | __call__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | begin |
Run a function with Resonate remotely. |
Method | begin |
Run a function with Resonate. |
Method | options |
Configure options for the function. |
Method | rpc |
Run a function with Resonate remotely and wait for the result. |
Method | run |
Run a function with Resonate and wait for the result. |
Class Variable | __name__ |
Undocumented |
Class Variable | __type |
Undocumented |
Property | func |
Undocumented |
Property | name |
Undocumented |
Instance Variable | _func |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _opts |
Undocumented |
Instance Variable | _resonate |
Undocumented |
Resonate
, name: str
, func: Callable[ Concatenate[ Context, P], R]
, opts: Options
):
¶
Undocumented
Function[ P, Generator[ Any, Any, T] | T]
, id: str
, *args: P.args
, **kwargs: P.kwargs
) -> Handle[ T]
:
¶
Run a function with Resonate remotely.
If a durable promise with the same id already exists, the method will subscribe to its result or return the value immediately if the promise has been completed.
Resonate will prevent duplicate executions for the same id.
- Function must be registered
- Function args and kwargs must be serializable
Function[ P, Generator[ Any, Any, T] | T]
, id: str
, *args: P.args
, **kwargs: P.kwargs
) -> Handle[ T]
:
¶
Run a function with Resonate.
If a durable promise with the same id already exists, the method will subscribe to its result or return the value immediately if the promise has been completed.
Resonate will prevent duplicate executions for the same id.
- Function must be registered
- Function args and kwargs must be serializable
Encoder[ Any, str | None] | None
= None, idempotency_key: str | Callable[ [ str], str] | None
= None, retry_policy: RetryPolicy | Callable[ [ Callable], RetryPolicy] | None
= None, tags: dict[ str, str] | None
= None, target: str | None
= None, timeout: float | None
= None, version: int | None
= None) -> Function[ P, R]
:
¶
Configure options for the function.
- encoder: Configure your own data encoder.
- idempotency_key: Define the idempotency key invocation or a function that
- receives the promise id and creates an idempotency key.
- retry_policy: Define the retry policy exponential | constant | linear | never
- tags: Add custom tags to the durable promise representing the invocation.
- target: Target to distribute the invocation.
- timeout: Number of seconds before the invocation timesout.
- version: Version of the function to invoke.
Function[ P, Generator[ Any, Any, T] | T]
, id: str
, *args: P.args
, **kwargs: P.kwargs
) -> T
:
¶
Run a function with Resonate remotely and wait for the result.
If a durable promise with the same id already exists, the method will subscribe to its result or return the value immediately if the promise has been completed.
Resonate will prevent duplicate executions for the same id.
- Function must be registered
- Function args and kwargs must be serializable
- This is a blocking operation
Function[ P, Generator[ Any, Any, T] | T]
, id: str
, *args: P.args
, **kwargs: P.kwargs
) -> T
:
¶
Run a function with Resonate and wait for the result.
If a durable promise with the same id already exists, the method will subscribe to its result or return the value immediately if the promise has been completed.
Resonate will prevent duplicate executions for the same id.
- Function must be registered
- Function args and kwargs must be serializable
- This is a blocking operation