Node.js - job.submit()

Jobs may be submitted from Nitric services or other batches using the submit method on the job reference. When submitting a job you can provide a payload that will be passed to the job handler function.

import { job } from '@nitric/sdk'
const analyze = job('analyze').allow('submit')
await analyze.submit({ message: 'message contents' })

Parameters

  • Name
    message
    Required
    Required
    Type
    Record<string, any>
    Description

    The data that will be sent to the submit

Examples

Submit a job request

import { job } from '@nitric/sdk'
const analyze = job('analyze').allow('submit')
await analyze.submit({ message: 'message contents' })
Last updated on Nov 28, 2024