Skip to content

plcgi1/fastify-delayed-job

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@plcgi1/fastify-delayed-job plugin

DESCRIPTION

REST api interface to make delayed jobs with pg-boss

FEATURES

  1. swagger UI for developers
  2. use pg-boss for delayed jobs with psql
  3. add delayed job with variables
  4. view list of delayed jobs
  5. cancel delayed jobs
  6. To be continued...

USE CASES

  1. Send delayed emails to clients with templates
  2. 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

  1. fastify.pgboss
  2. req.pgboss
  3. fastify.subscribers
  4. req.subscribers

ISSUES

PR and issues are welcome

DEPENDENCIES

  1. fastify
  2. fastify-plugin
  3. fastify-swagger
  4. sanitize-html
  5. pgboss
  6. mongo-sql
  7. autoloader
  8. dotenv

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published