0.0.6 • Published 3 years ago

worktop-quirrel v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

This package is currently a work-in-progress and should not be used.

Changes

Example Usage

import { Router } from 'worktop';
import * as Cache from 'worktop/cache';
import { Queue } from 'worktop-quirrel';

const API = new Router();

const ExampleJob = new Queue<Record<string, string>>(
  'job/call',
  (object) => {
    console.log("Job run!");
    console.log(object);

    return Promise.resolve();
  }
);

ExampleJob.addToRouter(API);
API.add('GET', '/job/trigger', async (request, response) => {
  await ExampleJob.enqueue({ "example": "payload" }, { delay: 2000 });
  response.send(200);
});

Cache.listen(API.run.bind(this));
0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago