🧾 Workflow models
Models are defined in webpush.apps.workflows.models
(external module) and registered in admin:
WorkflowFunctionRequestWorkflowRequestResponse
They store:
- workflow name, service, function
data_json(payload)transaction_idconsumer_id- final response flag (
final=True)
🧠 Redis caches
Local models in apps/workflows/models.py:
- SlackThreadMessages
- key:
thread_uuid - value:
thread_ts - TTL: 600 sec
- key:
- ReactivatingUnsubscribedUsersDateCache
- stores the last date for incremental runs
- no TTL
📚 Model pages
🗄️ DB routing
In staging/production there are 2 databases:
defaultworkflow
Routing is defined by MainDatabaseRouter
(apps/database.py), based on WorkflowDatabaseRouter.