To enable mbgl-tile-renderer to be run as a task worker service that can poll a queue for new requests. This PR adds support for Azure Storage Queue.
Screenshot
What I changed
Add a new file azure_queue_service.js which works with Azure Storage Queue to process a queue message containing a JSON body with the expected values required for rendering.
These values are passed to initiateRendering, which now takes an outputDir to be able to specify a volume mount in addition to the standard output/ dir. Currently, this is hard-coded as /maps which is the directory we are mounting on the Docker container in Azure.
Once rendering has been completed, the tool deletes the queue message from the storage queue.
What I'm not doing here
More work is needed on validations and throwing exceptions given this new deployment environment. That will come next.
Integration work to update a Postgres db table upon completion.
Goal
To enable mbgl-tile-renderer to be run as a task worker service that can poll a queue for new requests. This PR adds support for Azure Storage Queue.
Screenshot
What I changed
azure_queue_service.js
which works with Azure Storage Queue to process a queue message containing a JSON body with the expected values required for rendering.initiateRendering
, which now takes an outputDir to be able to specify a volume mount in addition to the standardoutput/
dir. Currently, this is hard-coded as/maps
which is the directory we are mounting on the Docker container in Azure.What I'm not doing here