Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

MarkNjunge/justjava-worker

Repository files navigation

JustJava Worker

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.

Prerequisites

Redis

Used for the queue.

  1. Create a Redis instance and get the url in the form redis://:password@host:port/0

Installation

  1. Clone the repository
$ git clone https://github.com/MarkNjunge/justjava-worker.git
  1. Make a ./config/local.json or ./.env file for configuration.
    See the variable mappings ./config/custom-environment-variables.json.
$ cp ./config/default.json ./local.json
  1. Install dependencies
$ yarn install
  1. Start the server
$ yarn run start

# watch mode
$ yarn run start:dev

About

Worker queue for JustJava to automatically update the status of orders

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published