Last active
March 4, 2020 02:49
-
-
Save jwulf/36f027a4db515b7f21c5d64a8c5f855f to your computer and use it in GitHub Desktop.
A code example from the article https://joshwulf.com/blog/2020/03/zb-batch-worker/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ZBClient } from 'zeebe-node' | |
const zbc = new ZBClient() | |
const batchWorker = zbc.createZBBatchWorker({ | |
taskType: 'rate-limited-api-call', | |
taskHandler: myHandler, | |
jobBatchMinSize: 10, // first of: every 10 jobs | |
jobBatchMaxTime: 60, // or every 60 seconds | |
timeout: 80 // must be greater than jobBatchMaxTime | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment