Worker queue for JustJava to automatically update ths status of orders.
When a payment for an order is completed, it is set to CONFIRMED and added to the order queue. The queue schedules it to be set to IN_PROGRESS after 30s*. After it is set to IN_PROGRESS, it schedules it to be set to COMPLETED in 60s*.
Written using Bull.
Used for the queue.
- Create a Redis instance and get the url in the form redis://:password@host:port/0
- Clone the repository
$ git clone https://github.com/MarkNjunge/justjava-worker.git- Make a
./config/local.jsonor./.envfile for configuration.
See the variable mappings ./config/custom-environment-variables.json.
$ cp ./config/default.json ./local.json- Install dependencies
$ yarn install- Start the server
$ yarn run start
# watch mode
$ yarn run start:dev