67NFGL7DFEKIS7D7HC72XJ5CET6SE6AOE5F37XXFTBU6GZAZ64HQC
}
sub clear_queue_non_current : Chained('admin') Path('clear-queue-non-current') Args(0) {
my ($self, $c) = @_;
$c->model('DB::Builds')->search({iscurrent => 0, busy => 0}, { join => 'schedulingInfo' })->delete_all;
$c->res->redirect("/admin");
}
sub clear_queue : Chained('admin') Path('clear-queue') Args(0) {
my ($self, $c) = @_;
$c->model('DB::Builds')->search({busy => 0}, { join => 'schedulingInfo' })->delete_all;
$c->res->redirect("/admin");
<li>Queue
<ul>
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('clear_queue')) content = "Clear all non-running builds from queue." confirmmsg = "Are you sure you want to clear the queue?" %]</li>
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('clear_queue_non_current')) content = "Clear all non-running old builds from queue." confirmmsg = "Are you sure you want to clear the queue?" %]</li>
</ul>
</li>