/
describe_schedule_dacx.py
36 lines (27 loc) · 1.1 KB
/
describe_schedule_dacx.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import asyncio
from temporalio.client import Client
"""dacx
To describe a Scheduled Workflow Execution in Python, use the [describe()](https://python.temporal.io/temporalio.client.ScheduleHandle.html#delete) asynchronous method on the Schedule Handle.
You can get a complete list of the attributes of the Scheduled Workflow Execution from the [ScheduleDescription](https://python.temporal.io/temporalio.client.ScheduleDescription.html) class.
dacx"""
async def main():
client = await Client.connect("localhost:7233")
handle = client.get_schedule_handle(
"workflow-schedule-id",
)
desc = await handle.describe()
print(f"Returns the note: {desc.schedule.state.note}")
if __name__ == "__main__":
asyncio.run(main())
""" @dacx
id: how-to-describe-a-scheduled-workflow-execution-in-python
title: How to describe a Scheduled Workflow Execution in Python
label: Describe a Scheduled Workflow Execution
description: Use the `describe()` asynchronous method on the Schedule Handler.
tags:
- scheduled workflow execution
- schedules
- python sdk
- code sample
lines: 5-8, 11-19
@dacx """