This worker is a cron job, which finds all the JOBS having status PUBLISHED to check if the operation hashes corresponding to the jobs are confirmed on Tezos block chain or not.
If an operation hash is confirmed, it will publish a message to rabbitMq using exchange type headers to notify about the operation confirmation.
Check if postgres database, rabbitMq and vault server are running. If not, you could start the services by using docker-compose
.
docker-compose up -d postgres rabbitmq vault
docker-compose up check-operation-status-worker
NOTES: This step could be skipped if it already ran.
npm i
npm run build
NOTES: This is optional. Bunyan helps to format the logs, so it is easier to read and nodemon helps auto recompile the code while you are in dev mode.
npm i -g bunyan nodemon
npm run check-operation-status | bunyan
npm run check-operation-status:dev | bunyan
Name | Default Value | Explanation |
---|---|---|
LOGGER_NAME | Check Operation Status Worker | The name of the logger |
LOGGER_LEVEL | info | The level of the logger |
CHECK_OPERATION_STATUS_WORKER_NAME | Check Operation Status Worker | The name of the process |
CHECK_OPERATION_STATUS_WORKER_TIMEOUT | 3000 | The process timeout in milliseconds |
CHECK_OPERATION_STATUS_CRON_TIME | * * * * * | The frequency of the cron job |