class documentation

class ScheduleHandle: (source)

Constructor: ScheduleHandle(client, id)

View In Hierarchy

Handle for interacting with a schedule.

This is usually created via Client.get_schedule_handle or returned from Client.create_schedule.

Method __init__ Create schedule handle.
Async Method backfill Backfill the schedule by going through the specified time periods as if they passed right now.
Async Method delete Delete this schedule.
Async Method describe Fetch this schedule's description.
Async Method pause Pause the schedule and set a note.
Async Method trigger Trigger an action on this schedule to happen immediately.
Async Method unpause Unpause the schedule and set a note.
Async Method update Update a schedule using a callback to build the update from the description.
Instance Variable id ID of the schedule.
Instance Variable _client Undocumented
def __init__(self, client: Client, id: str): (source)

Create schedule handle.

async def backfill(self, *backfill: ScheduleBackfill, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None): (source)

Backfill the schedule by going through the specified time periods as if they passed right now.

Parameters
*backfill:ScheduleBackfillBackfill periods.
rpc_metadata:Mapping[str, str]Headers used on the RPC call. Keys here override client-level RPC metadata keys.
rpc_timeout:Optional[timedelta]Optional RPC deadline to set for the RPC call.
async def delete(self, *, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None): (source)

Delete this schedule.

Parameters
rpc_metadata:Mapping[str, str]Headers used on the RPC call. Keys here override client-level RPC metadata keys.
rpc_timeout:Optional[timedelta]Optional RPC deadline to set for the RPC call.
async def describe(self, *, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None) -> ScheduleDescription: (source)

Fetch this schedule's description.

Parameters
rpc_metadata:Mapping[str, str]Headers used on the RPC call. Keys here override client-level RPC metadata keys.
rpc_timeout:Optional[timedelta]Optional RPC deadline to set for the RPC call.
Returns
ScheduleDescriptionUndocumented
async def pause(self, *, note: Optional[str] = None, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None): (source)

Pause the schedule and set a note.

Parameters
note:Optional[str]Note to set on the schedule.
rpc_metadata:Mapping[str, str]Headers used on the RPC call. Keys here override client-level RPC metadata keys.
rpc_timeout:Optional[timedelta]Optional RPC deadline to set for the RPC call.
async def trigger(self, *, overlap: Optional[ScheduleOverlapPolicy] = None, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None): (source)

Trigger an action on this schedule to happen immediately.

Parameters
overlap:Optional[ScheduleOverlapPolicy]If set, overrides the schedule's overlap policy.
rpc_metadata:Mapping[str, str]Headers used on the RPC call. Keys here override client-level RPC metadata keys.
rpc_timeout:Optional[timedelta]Optional RPC deadline to set for the RPC call.
async def unpause(self, *, note: Optional[str] = None, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None): (source)

Unpause the schedule and set a note.

Parameters
note:Optional[str]Note to set on the schedule.
rpc_metadata:Mapping[str, str]Headers used on the RPC call. Keys here override client-level RPC metadata keys.
rpc_timeout:Optional[timedelta]Optional RPC deadline to set for the RPC call.
@overload
async def update(self, updater: Callable[[ScheduleUpdateInput], Optional[ScheduleUpdate]], *, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None):
@overload
async def update(self, updater: Callable[[ScheduleUpdateInput], Awaitable[Optional[ScheduleUpdate]]], *, rpc_metadata: Mapping[str, str] = {}, rpc_timeout: Optional[timedelta] = None):
(source)

Update a schedule using a callback to build the update from the description.

The callback may be invoked multiple times in a conflict-resolution loop.

Parameters
updater:Callable[[ScheduleUpdateInput], Union[Optional[ScheduleUpdate], Awaitable[Optional[ScheduleUpdate]]]]Callback that returns the update. It accepts a ScheduleUpdateInput and returns a ScheduleUpdate. If None is returned or an error occurs, the update is not attempted. This may be called multiple times.
rpc_metadata:Mapping[str, str]Headers used on the RPC call. Keys here override client-level RPC metadata keys. This is for every call made within.
rpc_timeout:Optional[timedelta]Optional RPC deadline to set for the RPC call. This is for each call made within, not overall.

ID of the schedule.

Undocumented