rebuilderd icon indicating copy to clipboard operation
rebuilderd copied to clipboard

Delete orphaned builds in batches

Open kpcyrd opened this issue 2 years ago • 0 comments

There's a background job for cleanup that's likely looking up the database for extended periods of time:

https://github.com/kpcyrd/rebuilderd/blob/8ff458ff71381db01e1fba8abe01e974c7eacbf4/daemon/src/lib.rs#L36

This could be split up so the select is executed on its own, and the deletes are executed in batches, so each delete locks up the database briefly instead of locking it once for a long time.

kpcyrd avatar Jun 02 '22 23:06 kpcyrd