class _EphemeralServerWorkflowEnvironment(WorkflowEnvironment): (source)
Constructor: _EphemeralServerWorkflowEnvironment(client, server)
Undocumented
Method | __init__ |
Create a workflow environment from a client. |
Method | auto |
Disable any automatic time skipping if this is a time-skipping environment. |
Async Method | get |
Get the current time known to this environment. |
Async Method | shutdown |
Shut down this environment. |
Async Method | sleep |
Sleep in this environment. |
Async Method | time |
Undocumented |
Property | supports |
Whether this environment supports time skipping. |
Instance Variable | _auto |
Undocumented |
Instance Variable | _server |
Undocumented |
Instance Variable | _supports |
Undocumented |
Inherited from WorkflowEnvironment
:
Static Method | from |
Create a workflow environment from the given client. |
Async Static Method | start |
Start a full Temporal server locally, downloading if necessary. |
Async Static Method | start |
Start a time skipping workflow environment. |
Async Method | __aenter__ |
Noop for async with support. |
Async Method | __aexit__ |
For async with support to just call shutdown . |
Property | client |
Client to this environment. |
Instance Variable | _client |
Undocumented |
temporalio.client.Client
, server: temporalio.bridge.testing.EphemeralServer
):
(source)
¶
Create a workflow environment from a client.
Most users would use a static method instead.
Disable any automatic time skipping if this is a time-skipping environment.
This is a context manager for use via with. Usually in time-skipping environments, waiting on a workflow result causes time to automatically skip until the next event. This can disable that. However, this only applies to results awaited inside this context. This will not disable automatic time skipping on previous results.
This has no effect on non-time-skipping environments.
Get the current time known to this environment.
For non-time-skipping environments this is simply the system time. For time-skipping environments this is whatever time has been skipped to.
Sleep in this environment.
This awaits a regular asyncio.sleep
in regular environments,
or manually skips time in time-skipping environments.
Parameters | |
duration:Union[ | Amount of time to sleep. |