Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sidequest

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sidequest

Sidequest is simple background processor for node.js

  • 1.0.0-a3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

sidequest

Sidequest is simple background processor for node.js

It's the first task scheduler that you may add to your web application project with safety, by using child process or running on backgroun it wont block the main process, even with if the task use blocking io.

Usage

Tree steps to background tasks :rocket:

    1. Install sidequest dependency
npm install --save sidequest
    1. Create a task class

const { Task } = require('sidequest');

class MyJob extends Task {
  run(foo, bar){
    console.log(foo, bar);
  }
}

module.exports = MyJob;
    1. Create the sidequest-config.json and register your queues and tasks:
{
  "queues": [
    {
      "name": "high",
      "workers": 10
    },
    {
      "name": "default",
      "workers": 2
    }
  ],
  "tasks": [
    {
      "name": "MyJob",
      "path": "./playground/my-job.js",
      "queue": "high"
    }
  ]
}
    1. Initialize sidequest in you app:
    const sidequest = require('sidequest');
    
    // ...
    sidequest.start();
    // ...
  • Alternative: Start sidequest by command line:
$ npm install -g sidequest
$ sidequest 

FAQs

Package last updated on 12 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc