@plcgi1/fastify-delayed-job
v1.0.4
Published
## DESCRIPTION
Downloads
49
Maintainers
Readme
@plcgi1/fastify-delayed-job plugin
DESCRIPTION
REST api interface to make delayed jobs with pg-boss
FEATURES
- swagger UI for developers
- use pg-boss for delayed jobs with psql
- add delayed job with variables
- view list of delayed jobs
- cancel delayed jobs
- To be continued...
USE CASES
- Send delayed emails to clients with templates
- Execute some delayed jobs for your app, like as a cron with statistic in db(psql)
INSTALL
npm install @plcgi1/fastify-delayed-job
USAGE
Full usage example in ./examples folder. You can use it as boilerplate too
mkdir your-project
cd your-project
npm init
cp node_modules/@plcgi1/fastify-delayed-job/examples .
npm install
# edit .env file with your requirements
# create required database
# add subscribers logic.
# Interface example in src/subscribers/default.js
npm start
# go to browser - http://localhost:3000/docs
ADDITIONAL fastify objects
- fastify.pgboss
- req.pgboss
- fastify.subscribers
- req.subscribers
ISSUES
PR and issues are welcome