mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-01 06:11:02 -06:00
* fix: stop trying to parse payloads back from json
* feat: streaming example
* feat: aio output
* fix: lint
* feat: sync and async examples
* fix: small issues
* fix: one more small thing
* chore: version
* fix: lint
* fix: add sleeps
* feat: factor out run_async_from_sync
* Revert "feat: factor out run_async_from_sync"
This reverts commit fb37395913.
* fix: schedule trigger namespace issue
* fix: log error if action payload fails to decode but don't raise out of listener
20 lines
334 B
Python
20 lines
334 B
Python
import asyncio
|
|
|
|
from examples.streaming.worker import streaming_workflow
|
|
|
|
|
|
async def main() -> None:
|
|
ref = await streaming_workflow.aio_run_no_wait()
|
|
await asyncio.sleep(1)
|
|
|
|
stream = ref.stream()
|
|
|
|
async for chunk in stream:
|
|
print(chunk)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import asyncio
|
|
|
|
asyncio.run(main())
|