Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit e41c82f

Browse files
authored
Fix: Dynamic Crons Pydantic Key Error (hatchet-dev#300)
* fix, part i * fix: order of ops * fmt
1 parent 196f0ce commit e41c82f

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

examples/cron/programatic-async.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ async def create_cron() -> None:
2424
id = cron_trigger.metadata.id # the id of the cron trigger
2525
# !!
2626

27-
# ❓ Delete
28-
await hatchet.cron.aio.delete(cron_trigger=cron_trigger.metadata.id)
29-
# !!
30-
3127
# ❓ List
3228
cron_triggers = await hatchet.cron.aio.list()
3329
# !!
3430

3531
# ❓ Get
3632
cron_trigger = await hatchet.cron.aio.get(cron_trigger=cron_trigger.metadata.id)
3733
# !!
34+
35+
# ❓ Delete
36+
await hatchet.cron.aio.delete(cron_trigger=cron_trigger.metadata.id)
37+
# !!

examples/cron/programatic-sync.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
id = cron_trigger.metadata.id # the id of the cron trigger
2323
# !!
2424

25-
# ❓ Delete
26-
hatchet.cron.delete(cron_trigger=cron_trigger.metadata.id)
27-
# !!
28-
2925
# ❓ List
3026
cron_triggers = hatchet.cron.list()
3127
# !!
3228

3329
# ❓ Get
3430
cron_trigger = hatchet.cron.get(cron_trigger=cron_trigger.metadata.id)
3531
# !!
32+
33+
# ❓ Delete
34+
hatchet.cron.delete(cron_trigger=cron_trigger.metadata.id)
35+
# !!

hatchet_sdk/clients/rest_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ async def cron_create(
237237
workflow=workflow_name,
238238
create_cron_workflow_trigger_request=CreateCronWorkflowTriggerRequest(
239239
cronName=cron_name,
240-
expression=expression,
240+
cronExpression=expression,
241241
input=input,
242242
additional_metadata=additional_metadata,
243243
),

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "hatchet-sdk"
3-
version = "0.44.0"
3+
version = "0.44.1"
44
description = ""
55
authors = ["Alexander Belanger <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)