FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/jobs / startJobWorker

Function: startJobWorker()

startJobWorker(options?): Promise<JobWorker>

Discover job definitions and start a worker immediately.

This is the recommended shorthand for initializing the schema, loading the job registry, and starting the polling loop in one call.

Parameters

options?

JobWorkerOptions = {}

Worker options.

Returns

Promise<JobWorker>

A running JobWorker instance.

Example

const worker = await startJobWorker({ concurrency: 5 })