Type Alias: ThreadedJobHandler
type ThreadedJobHandler = (
job,
client
) => Promise<JobActionReceipt> | JobActionReceipt;
Handler function signature for threaded job workers.
Import this type in your handler module for full intellisense on job and client:
import type { ThreadedJobHandler } from "@camunda8/orchestration-cluster-api";
const handler: ThreadedJobHandler = async (job, client) => {
// full intellisense for job.variables, job.complete(), client.publishMessage(), etc.
return job.complete({ result: "done" });
};
export default handler;
Parameters
job
client
Returns
| Promise<JobActionReceipt>
| JobActionReceipt