Skip to content

Commit 7cad996

Browse files
author
root
committed
fix: lint
1 parent 2eb44ba commit 7cad996

6 files changed

Lines changed: 10 additions & 9 deletions

File tree

examples/python/scheduled/programatic-async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ async def create_scheduled() -> None:
1616
additional_metadata={
1717
"customer_id": "customer-a",
1818
},
19+
priority=3,
1920
)
2021

2122
scheduled_run.metadata.id # the id of the scheduled run trigger

examples/python/scheduled/programatic-sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
additional_metadata={
1616
"customer_id": "customer-a",
1717
},
18+
priority=2,
1819
)
1920

2021
id = scheduled_run.metadata.id # the id of the scheduled run trigger

sdks/go/features/schedules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ type SchedulesClient struct {
3838
}
3939

4040
type BulkUpdateScheduledRunItem struct {
41-
TriggerAt time.Time `json:"triggerAt"`
4241
ScheduledRunId string `json:"scheduledRunId"`
42+
TriggerAt time.Time `json:"triggerAt"`
4343
}
4444

4545
// NewSchedulesClient creates a new SchedulesClient

sdks/python/examples/scheduled/programatic-async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async def create_scheduled() -> None:
1616
additional_metadata={
1717
"customer_id": "customer-a",
1818
},
19-
priority=3
19+
priority=3,
2020
)
2121

2222
scheduled_run.metadata.id # the id of the scheduled run trigger

sdks/python/examples/scheduled/programatic-sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
additional_metadata={
1616
"customer_id": "customer-a",
1717
},
18-
priority=2
18+
priority=2,
1919
)
2020

2121
id = scheduled_run.metadata.id # the id of the scheduled run trigger

sdks/python/hatchet_sdk/features/scheduled.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def create(
7575
:param trigger_at: The datetime when the run should be triggered.
7676
:param input: The input data for the scheduled workflow.
7777
:param additional_metadata: Additional metadata associated with the future run as a key-value pair.
78+
:param priority: The priority of the scheduled workflow run. Must be between 1 and 3, inclusive.
7879
7980
:return: The created scheduled workflow instance.
8081
"""
@@ -86,7 +87,7 @@ def create(
8687
triggerAt=trigger_at,
8788
input=input,
8889
additionalMetadata=additional_metadata,
89-
priority=priority
90+
priority=priority,
9091
),
9192
)
9293

@@ -96,6 +97,7 @@ async def aio_create(
9697
trigger_at: datetime.datetime,
9798
input: JSONSerializableMapping,
9899
additional_metadata: JSONSerializableMapping,
100+
priority: int | None = None,
99101
) -> ScheduledWorkflows:
100102
"""
101103
Creates a new scheduled workflow run.
@@ -106,16 +108,13 @@ async def aio_create(
106108
:param trigger_at: The datetime when the run should be triggered.
107109
:param input: The input data for the scheduled workflow.
108110
:param additional_metadata: Additional metadata associated with the future run as a key-value pair.
111+
:param priority: The priority of the scheduled workflow run. Must be between 1 and 3, inclusive.
109112
110113
:return: The created scheduled workflow instance.
111114
"""
112115

113116
return await asyncio.to_thread(
114-
self.create,
115-
workflow_name,
116-
trigger_at,
117-
input,
118-
additional_metadata,
117+
self.create, workflow_name, trigger_at, input, additional_metadata, priority
119118
)
120119

121120
def delete(self, scheduled_id: str) -> None:

0 commit comments

Comments
 (0)