1a12fb870b
- New /developers/ page with API docs, SDKs, pricing, use cases - OpenAPI 3.0 spec for Orders, Missions, Photos, Analytics - Case study: Glasskiosken i Flatenbadet — complete ROI analysis - Updated /order/ with recurring missions and frequency dropdown
23 lines
418 B
JavaScript
23 lines
418 B
JavaScript
'use strict'
|
|
|
|
const { Writable } = require('stream')
|
|
const parentPort = require('worker_threads').parentPort
|
|
|
|
async function run (opts) {
|
|
return new Writable({
|
|
autoDestroy: true,
|
|
write (chunk, enc, cb) {
|
|
if (parentPort) {
|
|
parentPort.postMessage({
|
|
code: 'EVENT',
|
|
name: 'context',
|
|
args: opts.$context
|
|
})
|
|
}
|
|
cb()
|
|
}
|
|
})
|
|
}
|
|
|
|
module.exports = run
|