X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=GitMonitor.vala;h=7e42154a36ed151ddd550430b44291e697db7edc;hp=798971c49438b46d9935dca0bee8c2382c88848b;hb=9e641e366549656621a3e4fc4950b62c4b395650;hpb=1f7e6b712f9ee99d621a3a67f1c0795c6106bde6 diff --git a/GitMonitor.vala b/GitMonitor.vala index 798971c4..7e42154a 100644 --- a/GitMonitor.vala +++ b/GitMonitor.vala @@ -54,13 +54,19 @@ public class GitMonitor : Monitor if (this.queue.size < 1 || this.queueRunning) { return true; } + var first = this.queue.get(0); + var delay = true; + if (!first.repo.is_wip_branch() && first.repo.is_auto_branch()) { + delay = false; + } + var last = -1 * this.lastAdd.difference(new DateTime.now(new TimeZone.local())); // stdout.printf("LAST RUN: %s (expect %s) \n" , // last.to_string(), (5 * TimeSpan.SECOND).to_string() ); - if (last < 5 * TimeSpan.SECOND) { // wait 5 seconds before running. ???? + if (delay && last < 5 * TimeSpan.SECOND) { // wait 5 seconds before running. ???? return true; } //_this.lastAdd = new Date();