PG Boss Concurrent Jobs

Hi everyone 👋

I’m using Pg-Boss jobs in Wasp (0.16.x).

Right now only one contentGenerationJob runs at a time, even when multiple users queue drafts.

I’d like:
  • A global concurrency of 3 jobs per worker process.
  • A per-user limit of 1 active job (token-bucket in the worker).
Docs say to set options through PG_BOSS_NEW_OPTIONS, but I keep tripping dotenv / JSON parsing.

Could somebody confirm the correct .env.server lines and any extra code needed?

This is what I think should work in .env.server:

PG_BOSS_NEW_OPTIONS='{"teamConcurrency":3}'
USER_JOB_CONCURRENCY=1


After restarting wasp start I expect to see pg-boss: subscriptions online | teamConcurrency=3 in the logs.

But I get:

Environment variable PG_BOSS_NEW_OPTIONS was not parsable by JSON.parse()!


Is there a better pattern recommended by the Wasp team for per-user fairness + global parallelism?

Any sample snippet / repo link would be super helpful.

Thanks! 🙏
Was this page helpful?