node-graphql-jobs

0.1.3 • Public • Published

Conventional Commits Build Status

node-graphql-jobs

A job scheduler, a runner and an interface to manage jobs. In one lib.

  • What does it do?

It allows you to setup many execution pipelines and run them.

  • How it works

NGJ (node-graphql-jobs) is available as:

  • A standalone nodejs application
  • A schema plugable to your Apollo server Schema
  • Does the jobs persists if the server is stopped

By default the server runs on a local SQLite database. You can use your own database by providing a sequelize configuration.

Migration commands are available to migrate your database manually. We strongly advise to specify a dedicated schema when using your own database to avoid any naming overlap.

  • How can I integrate NGJ to my app?

To use the api, there is node-graphql-jobs-react that provide convenient Components to list/trigger/delete and other useful actions.

Table of Contents

Available commands

npx node-jobs start

When the server is starter, you can open the following url and discover the schema:

http://localhost:8080/graphiql

Modifting Node-jobs

Install the development environment

apt-get install git curl yarn
# or 
brew install git curl yarn

node & npm & yarn

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
nvm install 12
nvm use 12

Get the project

git clone git@github.com:teamstarter/node-jobs.git
cd node-jobs
yarn
yarn start

Be able to run bin files from the local node_modules folder

vim ~/.bashrc
#Add at the end of the file: 
alias npm-exec='PATH=$(npm bin):$PATH'
npm-exec
:wq #Then save and quit 
source ~/.bashrc

TODO list

  • Migrate the project to typescript
  • Add pipelines
  • Make batches work (with status "stashed")
  • Delete old jobs when re-assigning them.
  • ?

Project References

The React library

Readme

Keywords

none

Package Sidebar

Install

npm i node-graphql-jobs

Weekly Downloads

0

Version

0.1.3

License

LGPL

Unpacked Size

17.4 kB

Total Files

15

Last publish

Collaborators

  • coldlestat