Builds now have a "Bump up" action. This will cause the queue runner to prioritise the steps of the build above all other steps.
WE5Q2NVIIK4R2DUUZYLJFQVYK5O26EDEJRPK3CPGWHU3SEAC2DQAC YMNEN6YYAVHVIHODAJB2BXYJGUACO7BK4MZXQAZPPGAWR2FXSIUAC T5BIOVJEMBIASP7EKQVV2N3VD6I56UXH6LCD5I33BDQEVHJAMGKQC 46ADBTMQAHQAPW3OCI24F4I5DVK5N5QVHUA4TQVB6HFN337CHAVQC MHVIT4JYWUYD4UCGB2AHLXWLX6B5SYE22BREERNGANT7RGGDUFOAC HJOEIMLRDVQ2KZI5HGL2HKGBM3AHP7YIKGKDAGFUNKRUXVRB24NAC OG3Z3QGCG2FNDGF4VQYWOXLZCF7LGTZCUMGKUCBNAPAQ5FRFHQ2AC Z6MDQIGODVE7RXX5U5D64EEC2ZDEZ36Z4ZMPFYIHWBG42IXUDYFQC LZVO64YG43JD7YMZSCTZNOBS5ROZA4FMPKJW2YOMHX2V5PTGBVWQC LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC MOX7XJ2E3XISXA7V7T4W6GEAGECGWBZ4PYSLTYBVVR4VAKOI33CQC L2E6EVE2RVFVDCUNRJ4CZYSQNS2DZUA5DTBETHBDUQUV2KQQRAOQC FTPCV25MOLQUNR5CAR453W7T7QTUZRLPLEOSDZ5HSDFAXQZVHOYQC JIJDYWPYMZZNFBCWYSYR72RNEW5MSI26MJ5UXXIU7DDX25IBR3CQC N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC RVHBV3B3RA3QTPQFCTICFFG5QGRUZ7EGXZNR4W2MOM2HPBHPZV7AC D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC if (buildsCancelled.get() || buildsDeleted.get()) {printMsg(lvlTalkative, "got notification: builds cancelled");removeCancelledBuilds(*conn);
if (buildsCancelled.get() || buildsDeleted.get() || buildsBumped.get()) {printMsg(lvlTalkative, "got notification: builds cancelled or bumped");processQueueChange(*conn);
auto res = txn.parameterized("select id, project, jobset, job, drvPath, maxsilent, timeout, timestamp from Builds where id > $1 and finished = 0 order by id")(lastBuildId).exec();
auto res = txn.parameterized("select id, project, jobset, job, drvPath, maxsilent, timeout, timestamp, globalPriority from Builds where id > $1 and finished = 0 order by id")(lastBuildId).exec();
/* Update the lowest build ID field of each dependency. Thisis used by the dispatcher to start steps in order of buildID. */visitDependencies([&](const Step::ptr & step) {auto step_(step->state.lock());step_->lowestBuildID = std::min(step_->lowestBuildID, build->id);}, build->toplevel);
build->propagatePriorities();
void State::removeCancelledBuilds(Connection & conn)
void Build::propagatePriorities(){/* Update the highest global priority and lowest build ID fieldsof each dependency. This is used by the dispatcher to startsteps in order of descending global priority and ascendingbuild ID. */visitDependencies([&](const Step::ptr & step) {auto step_(step->state.lock());step_->highestGlobalPriority = std::max(step_->highestGlobalPriority, globalPriority);step_->lowestBuildID = std::min(step_->lowestBuildID, id);}, toplevel);}void State::processQueueChange(Connection & conn)
sub bump : Chained('buildChain') PathPart('bump') {my ($self, $c, $x) = @_;my $build = $c->stash->{build};requireProjectOwner($c, $build->project); # FIXME: require admin?$c->model('DB')->schema->txn_do(sub {$build->update({globalpriority => time()});});$c->flash->{successMsg} = "Build has been bumped to the front of the queue.";$c->res->redirect($c->uri_for($self->action_for("build"), $c->req->captures));}
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-07-30 16:52:20# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Y2lDtgY8EBLOuCHAI8fWRQ
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-08-10 15:10:41# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rjifgnPtjY96MaQ7eiGzaA
alter table Builds add column globalPriority integer not null default 0;create function notifyBuildBumped() returns trigger as 'begin notify builds_bumped; return null; end;' language plpgsql;create trigger BuildBumped after update on Builds for each rowwhen (old.globalPriority != new.globalPriority) execute procedure notifyBuildBumped();