Skip to content

Usage in serverless environment #403

Answered by timgit
bentron2000 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, I would recommend using the fetch/complete/fail API since these aren't polling the database looking for work. Starting an instance of pg-boss is not expensive, especially if you're skipping the maintenance via noSupervisor. If you choose to do that, you would want to start an instance in a cron at some point to ensure things like the retention policy are being enforced. I haven't added a maintenance API yet to run this manually, but that would probably be ideal in order to know when it's done. Until then, you can listen for the maintenance event and then stop it.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bentron2000
Comment options

@trompx
Comment options

Answer selected by bentron2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants