timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.13k stars 158 forks source link

Deleting/clearing queue #43

Closed roytz closed 6 years ago

roytz commented 6 years ago

Is there a way (beside connecting to PG and doing it manually) to delete all jobs using pg-boss api?

timgit commented 6 years ago

No. I do this manually during testing.

On Dec 18, 2017, at 6:55 AM, roytz notifications@github.com wrote:

Is there a way (beside connecting to PG and doing it manually) to delete all jobs using pg-boss api?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

chrisjensen commented 6 years ago

Do you still do this? I'm having trouble finding an example in the tests.

timgit commented 6 years ago

There's no api for it atm

chrisjensen commented 6 years ago

Oh, when you said manually, I thought you meant there was a DROP ALL or TRUNCATE statement somewhere in the tests. But I guess you mean you just login to the server and do this manually between test runs?

timgit commented 6 years ago

Yes, /test/testHelper.js has a couple scripts to delete things for some tests, but it's not surfaced in the pg-boss module.