Add buildStarted plugin hook

This commit is contained in:
Shea Levy
2016-03-11 21:48:31 -05:00
parent 49f94bac3a
commit 9b37cb89ae
6 changed files with 51 additions and 15 deletions

View File

@ -318,7 +318,16 @@ private:
killed before it has finished sending notifications about a
build, then the notifications may be lost. It would be better
to mark builds with pending notification in the database. */
typedef std::pair<BuildID, std::vector<BuildID>> NotificationItem;
struct NotificationItem
{
enum class Type : char {
Started,
Finished
};
Type type;
BuildID id;
std::vector<BuildID> dependentIds;
};
nix::Sync<std::queue<NotificationItem>> notificationSenderQueue;
std::condition_variable notificationSenderWakeup;