mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-31 13:49:48 -06:00
* feat: olap payloads table * feat: olap queue messages for payload puts * feat: wire up writes on task write * driveby: add + ignore psql-connect * fix: down migration * fix: use external id for pk * fix: insert query * fix: more external ids * fix: bit more cleanup * feat: dags * fix: the rest of the refs * fix: placeholder uuid * fix: write external ids * feat: wire up messages over the queue * fix: panic * Revert "fix: panic" This reverts commitc0adccf2ea. * Revert "feat: wire up messages over the queue" This reverts commit36f425f3c1. * fix: rm unused method * fix: rm more * fix: rm cruft * feat: wire up failures * feat: start wiring up completed events * fix: more wiring * fix: finish wiring up completed event payloads * fix: lint * feat: start wiring up external ids in the core * feat: olap pub * fix: add returning * fix: wiring * debug: log lines for pubs * fix: external id writes * Revert "debug: log lines for pubs" This reverts commitfe430840bd. * fix: rm sample * debug: rm pub buffer param * Revert "debug: rm pub buffer param" This reverts commitb42a5cacbb. * debug: stuck queries * debug: more logs * debug: yet more logs * fix: rename BulkRetrieve -> Retrieve * chore: lint * fix: naming * fix: conn leak in putpayloads * fix: revert debug * Revert "debug: more logs" This reverts commit95da7de64f. * Revert "debug: stuck queries" This reverts commit8fda64adc4. * feat: improve getters, olap getter * fix: key type * feat: first pass at pulling olap payloads from the payload store * fix: start fixing bugs * fix: start reworking `includePayloads` param * fix: include payloads wiring * feat: analyze for payloads * fix: simplify writes more + write event payloads * feat: read out event payloads * feat: env vars for dual writes * refactor: clean up task prop drilling a bit * feat: add include payloads params to python for tests * fix: tx commit * fix: dual writes * fix: not null constraint * fix: one more * debug: logging * fix: more debugging, tweak function sig * fix: function sig * fix: refs * debug: more logging * debug: more logging * debug: fix condition * debug: overwrite properly * fix: revert debug * fix: rm more drilling * fix: comments * fix: partitioning jobs * chore: ver * fix: bug, docs * hack: dummy id and inserted at for payload offloads * fix: bug * fix: no need to handle offloads for task event data * hack: jitter + current ts * fix: short circuit * fix: offload payloads in a tx * fix: uncomment sampling * fix: don't offload if external store is disabled * chore: gen sqlc * fix: migration * fix: start reworking types * fix: couple more * fix: rm unused code * fix: drill includePayloads down again * fix: silence annoying error in some cases * fix: always store payloads * debug: use workflow run id for input * fix: improve logging * debug: logging on retrieve * debug: task input * fix: use correct field * debug: write even null payloads to limit errors * debug: hide error lines * fix: quieting more errors * fix: duplicate example names, remove print lines * debug: add logging for olap event writes * hack: immediate event offloads and cutovers * fix: rm log line * fix: import * fix: short circuit events * fix: duped names
37 lines
745 B
Python
37 lines
745 B
Python
from pydantic import BaseModel
|
|
|
|
from hatchet_sdk import Hatchet
|
|
|
|
hatchet = Hatchet()
|
|
|
|
|
|
class DynamicCronInput(BaseModel):
|
|
name: str
|
|
|
|
|
|
dynamic_cron_workflow = hatchet.workflow(
|
|
name="DynamicCronWorkflow", input_validator=DynamicCronInput
|
|
)
|
|
|
|
# > Create
|
|
cron_trigger = dynamic_cron_workflow.create_cron(
|
|
cron_name="customer-a-daily-report",
|
|
expression="0 12 * * *",
|
|
input=DynamicCronInput(name="John Doe"),
|
|
additional_metadata={
|
|
"customer_id": "customer-a",
|
|
},
|
|
)
|
|
|
|
|
|
id = cron_trigger.metadata.id # the id of the cron trigger
|
|
|
|
# > List
|
|
cron_triggers = hatchet.cron.list()
|
|
|
|
# > Get
|
|
cron_trigger = hatchet.cron.get(cron_id=cron_trigger.metadata.id)
|
|
|
|
# > Delete
|
|
hatchet.cron.delete(cron_id=cron_trigger.metadata.id)
|