1.1.10 • Published 9 months ago

@likable-hair/breeze v1.1.10

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Getting Started

This package is available in the npm registry.

pnpm install breeze

Next, configure the package by running the following command.

node ace configure breeze

Creating Jobs

You can create a new job by running the following command.

node ace jobs:make SendEmail

Listening for Jobs

First, you need to start the jobs listener, you can spawn multiple listeners to process jobs concurrently.

node ace jobs:listen  # default queue from env `REDIS_QUEUE`

node ace jobs:listen --queue=high
node ace jobs:listen --queue=high --queue=medium
node ace jobs:listen --queue=high,medium,low

node ace jobs:listen --queue=high --concurrency=3

Dispatching Jobs

Dispatching jobs is as simple as importing the job class and calling

import SendEmail from 'path/to/jobs/send_email.js'

await SendEmail.dispatch({ ... })

await SendEmail.dispatch({ ... }, { // for more job options check https://docs.bullmq.io/
  attempts: 3,
  delay: 1000,
})

Import Aliases (optional)

update your package.json and tsconfig.json to use import aliases

package.json

{
  "imports": {
    "#jobs/*": "./app/jobs/*.js"
  }
}

tsconfig.json

{
  "compilerOptions": {
    "paths": {
      "#jobs/*": ["./app/jobs/*.js"]
    }
  }
}
import SendEmail from '#jobs/send_email.js'

await SendEmail.dispatch({ ... })
1.1.10

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.6-3

9 months ago

1.1.6-2

9 months ago

1.1.6-0

9 months ago

1.1.5

9 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.3-1

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.1-4

10 months ago

1.1.1-3

10 months ago

1.1.1-2

10 months ago

1.1.1-1

10 months ago

1.1.1-0

10 months ago

1.1.0

10 months ago

1.0.8-9

10 months ago

1.0.8-8

10 months ago

1.0.8-7

10 months ago

1.0.8-6

10 months ago

1.0.8-5

10 months ago

1.0.8-4

10 months ago

1.0.8-3

10 months ago

1.0.8-2

10 months ago

1.0.8-1

10 months ago

1.0.8-0

10 months ago

1.0.7

10 months ago

1.0.5

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago