Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Message Queue

default discord avatar
Deleted User3 years ago
1

Any advice about adding a message queue for tasks like sending emails and other functions there can run later?

  • discord user avatar
    dribbens
    3 years ago

    I have some thoughts on this. Making your hooks run async is a great start to not need to manage work in a queue. That said if you still do you can add any library you need to. Hell, you could even make a collection for

    Tasks

    and run a cron job on your server that:


    1) Uses the local API to query for new "tasks"


    2) Calls the function associated with each kind of job


    3) Updates the task with a complated timestamp, or increments a failed counter (typical queue workers will have a max failed attempts setting)

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.