3.0.5 • Published 7 days ago

fastify-bree v3.0.5

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
7 days ago

fastify-bree

Continuous Integration Package Manager CI NPM version GitHub package.json version GitHub

This plugin integrate bree with fastify to support scheduling jobs.

Disclaimer: Although this plugin add a handy method to integrate with TypeScript. It is a known issue TypeScript do not have a good support about worker_threads.

Install

npm install fastify-bree --save

yarn add fastify-bree

Usage

import Fastifybree from 'fastify-bree'
import * as path from 'path'

fastify.register(Fastifybree, {
  customOptions: {
    root: path.resolve('jobs')
  }
})

await fastify.bree.add({
  name: 'cron' // which will use the file - `process.cwd()/jobs/cron.ts`
})

Options

options.customOptions

The options which will be directly passed to bree.

import Fastifybree from 'fastify-bree'

fastify.register(Fastifybree, {
  customOptions: {
    
  }
})

See: bree

options.autoStart

This options will add a onReady hooks to start all pre-registered jobs.

import Fastifybree from 'fastify-bree'

fastify.register(Fastifybree, {
  autoStart: true
})

options.autoClose

This options will add a onClose hooks to stop all running jobs.

import Fastifybree from 'fastify-bree'

fastify.register(Fastifybree, {
  autoClose: true
})
3.0.5

7 days ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

1.0.5

2 years ago

2.0.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

0.1.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago