mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-21 08:40:10 -06:00
* docs: update self-hosted defaults to use v1 * docs: durable execution * rm dep * lint: run black * redundant readme * more wording * other small things * isort
23 lines
360 B
Python
23 lines
360 B
Python
import time
|
|
|
|
from examples.durable_event.worker import (
|
|
EVENT_KEY,
|
|
durable_event_task,
|
|
durable_event_task_with_filter,
|
|
hatchet,
|
|
)
|
|
|
|
durable_event_task.run_no_wait()
|
|
durable_event_task_with_filter.run_no_wait()
|
|
|
|
print("Sleeping")
|
|
time.sleep(2)
|
|
|
|
print("Pushing event")
|
|
hatchet.event.push(
|
|
EVENT_KEY,
|
|
{
|
|
"user_id": "1234",
|
|
},
|
|
)
|