🧾 Workflow models

Models are defined in webpush.apps.workflows.models (external module) and registered in admin:

  • WorkflowFunctionRequest
  • WorkflowRequestResponse

They store:

  • workflow name, service, function
  • data_json (payload)
  • transaction_id
  • consumer_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
  • ReactivatingUnsubscribedUsersDateCache
    • stores the last date for incremental runs
    • no TTL

📚 Model pages

🗄️ DB routing

In staging/production there are 2 databases:

  • default
  • workflow

Routing is defined by MainDatabaseRouter (apps/database.py), based on WorkflowDatabaseRouter.

2 items under this folder.