2 ms·
Our product has an asynchronous scheduler that runs various types of “Jobs”. (This is all for a PHP-FPM based server) We have “RemoteJob”a that run entirely on
by charrondev 6y ago
Our product has an asynchronous scheduler that runs various types of “Jobs”. (This is all for a PHP-FPM based server)
We have “RemoteJob”a that run entirely on a separate server. The name of the job, and a message (including information about how to run the job) are passed the remote queue which will schedule the job based on priority and availability. Ideal for sending emails, making requests to external services, processing web hooks, updating records in the search engine, bulk deletion, etc.
We have “LocalJob” that run in the same process but are deferred until after the response to the client is finished sending. These can be used for simple things like preparing a payload for a remote job, small bulk deletion operations, sending in app notification to a large pool of users, etc.
Additionally we have a “CallbackJob” that may schedule out a bit of work and callback an API endpoint in the app when there is load available, either to return the value of the job or to trigger additional processing. Our current use essentially been to come back the app when load is available to recalculate some expensive cached values.