@mgfx/task-bull
TypeScript icon, indicating that this package has built-in type declarations

0.1.18 • Public • Published

@mgfx/task-bull

A generic mgFx task definition that allows you to run Bull Jobs.

Features

  • Delegate a Task's computation to existing Bull Jobs
  • Gain the benefits of mgFx's Future-based asynchronous behaviour

Usage

  1. Install @mgfx/task-bull into your existing mgFx application:
$ yarn add @mgfx/task-bull
  1. Define a Bull task using defineBullTask:
import { defineBullTask } from '@mgfx/task-bull`;

const videoTranscodeQueue = new Bull();

const transcodeVideo = defineBullTask({
  name: 'transcodeVideo',
  queue: videoTranscodeQueue
});

mgFx.serve(transcodeVideo);

mgFx.run(transcodeVideo({/* ... */})).pipe(/* Fluture.fork, etc */)

Readme

Keywords

none

Package Sidebar

Install

npm i @mgfx/task-bull

Weekly Downloads

1

Version

0.1.18

License

ISC

Unpacked Size

12.3 kB

Total Files

7

Last publish

Collaborators

  • nateabele
  • warrenseymour