Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mblayman/django-temporal-demo
https://github.com/mblayman/django-temporal-demo
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mblayman/django-temporal-demo
- Owner: mblayman
- Created: 2023-11-20T05:34:00.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-13T06:11:35.000Z (11 months ago)
- Last Synced: 2024-10-11T11:25:39.404Z (about 1 month ago)
- Language: Python
- Size: 20.5 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Temporal demo
This demo project shows a Temporal workflow in operation.
Because this demo is for a live presentation,
portions of this flow will be synthetic.* Django site - http://localhost:8000
* Temporal UI - http://localhost:8233## Big (Dumb) Assumptions
* There is only a single user to support. This avoids auth and work around
selecting the right user.
* This code is not going to production. Please, do NOT blindly copy/paste
without thinking about what your code needs to do.
* Assuming use of NGROK_URL so the demo will not run without setting a value
in a `.env` file. The value could be anything, but the notifications won't work
without a publicly resolvable URL.## Plan
1. Run the trigger view to pretend to be a scheduled workflow.
2. Interact with the happy path so that nothing is added to the escrow.
3. Show the failure path to show that the escrow is incremented.## The Workflow
1. Send the rich notification.
2. Wait for a signal.
3. Update escrow.
4. On failure, notify escrow amount.## Files of Interest
* `Procfile`
* `workflows.py`
* `activities.py`
* `views.py`
* `run_worker.py`