Workers
The workers folder contains the scripts that are used to send the notifications to the different target devices.
Keep all your workers alive.
For example, if you have two workers (one sending to Email and another sending to Android devices) and one of them fails (i.e. the Email one), your Push API will not be sending Email notifications because there is nobody sending it.
Each worker follows this steps:
- Checks its target queue in order to get the pending notifications.
- Retrieves the data and prepares the message.
- Sends the message to the given target.
When the queue is empty the worker is waiting to a new entry but this can fail while is running and it is recommended to use some service to keep the workers running.
Here are some recommended services that will keep your workers alive:
- Forever (Github project).
- Supervisor (Github project).
It is not recommended to use the unix crontab to run the workers.
Updated less than a minute ago
