Resource-intensive tasks should be allowed to be processed asynchronously. They are appended to the central task queue, and processed separately when possible.
Several ways to run pending tasks:
- Via a dedicated API
- Via Cron Jobs
Important things to keep in mind:
- Tasks must be prioritizable.
- Running tasks must be locked to avoid processing them multiple times.
- The lock must be cluster-compatible.
Resource-intensive tasks should be allowed to be processed asynchronously. They are appended to the central task queue, and processed separately when possible.
Several ways to run pending tasks:
Important things to keep in mind: