Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Building Blocks & Utilities

Building Blocks & Utilities

Prevent Concurrent Runs with Redis Locking

When a webhook arrives, it uses a Redis lock value so only one workflow handles the task at a time.

What it does

#### 🔒 This workflow demonstrates Redis-based locking to prevent concurrent execution of workflows. Steps: + Try to acquire a lock via Redis + If successful, execute workflow + If duplicate request; ignore request + Release the lock after completion

The steps

  1. END
  2. Workflow 1
  3. Workflow 2
  4. Workflow 3
  5. Incoming Webhook Data
  6. Fetch Webhook Data & Declare lockValue
  7. Check Redis Lock
  8. Acquire Redis Lock
  9. redisLock existence boolean
  10. redisLock acquired booleans
  11. Poll for lock
  12. duplicateWebhook boolean
  13. Discard Redis Lock
  14. Workflow Switch

Similar automations