mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
434e379f9a
git-subtree-dir: plugin-server git-subtree-mainline:776b056b6d
git-subtree-split:01a99a4e26
15 lines
448 B
TypeScript
15 lines
448 B
TypeScript
import Piscina from '@posthog/piscina'
|
|
|
|
import { defaultConfig } from '../../src/config/config'
|
|
import { LogLevel } from '../../src/types'
|
|
import { makePiscina } from '../../src/worker/piscina'
|
|
|
|
export function setupPiscina(workers: number, tasksPerWorker: number): Piscina {
|
|
return makePiscina({
|
|
...defaultConfig,
|
|
WORKER_CONCURRENCY: workers,
|
|
TASKS_PER_WORKER: tasksPerWorker,
|
|
LOG_LEVEL: LogLevel.Log,
|
|
})
|
|
}
|