forked from lix-project/hydra
hydra-queue-runner: Allow concurrent notifications
The queue runner can now run up to ‘max-concurrent-notifications’ in parallel (default is 2). This is useful when some hydra-notify invocations can take a long time to complete (e.g. because they need to compress a giant build log) and we don't want this to block all other notifications.
This commit is contained in:
parent
bba383bf1b
commit
e78b9fd4ee
|
@ -833,6 +833,8 @@ void State::run(BuildID buildOne)
|
|||
std::thread(&State::dispatcher, this).detach();
|
||||
|
||||
/* Idem for notification sending. */
|
||||
auto maxConcurrentNotifications = config->getIntOption("max-concurrent-notifications", 2);
|
||||
for (uint64_t i = 0; i < maxConcurrentNotifications; ++i)
|
||||
std::thread(&State::notificationSender, this).detach();
|
||||
|
||||
/* Periodically clean up orphaned busy steps in the database. */
|
||||
|
|
Loading…
Reference in a new issue