getQueuedBuilds(): Periodically stop to handle priority bumps

Previously, priority bumps could take a long time to get noticed if
getQueuedBuilds() was busy processing zillions of queue
additions. (This was made worse by the reintroduction of substitute
checking.)
This commit is contained in:
Eelco Dolstra
2015-10-22 17:00:46 +02:00
parent 71bf7e02d5
commit 53c80d9526
2 changed files with 20 additions and 6 deletions

View File

@ -377,7 +377,7 @@ private:
void queueMonitorLoop();
/* Check the queue for new builds. */
void getQueuedBuilds(Connection & conn, std::shared_ptr<nix::StoreAPI> store, unsigned int & lastBuildId);
bool getQueuedBuilds(Connection & conn, std::shared_ptr<nix::StoreAPI> store, unsigned int & lastBuildId);
/* Handle cancellation, deletion and priority bumps. */
void processQueueChange(Connection & conn);