Do not delete builds when clearing the queue. Fixes #8.

[?]
Apr 30, 2012, 8:13 PM
RXSEJG7WZAVP3XCRF3GWBM4JTNTEK7E7MANOJ2K5HZ5W4GU6ZL3AC

Dependencies

  • [2] JARRBLZD Bootstrapify the Hydra forms (except the project and jobset edit pages)
  • [3] 67NFGL7D add links in admin page to clear queue (all non-running builds, and all non-running old (non-current) builds)
  • [4] MOX7XJ2E Merge the BuildSchedulingInfo table into the Builds table
  • [5] QT4FO2HP refactored admin controller, using chains, to avoid using requireadmin on each endpoint
  • [6] SMCOU72F hydra: add some admin for adding/enabling/etc build machines
  • [*] ZWCTAZGL added newsitems, added some admin options to clear various caches.

Change contents

  • replacement in src/lib/Hydra/Controller/Admin.pm at line 328
    [3.117][3.627:768]()
    # !!! Mark the builds as cancelled instead.
    $c->model('DB::Builds')->search({finished => 0, iscurrent => 0, busy => 0})->delete_all;
    [3.117]
    [3.225]
    $c->model('DB::Builds')->search({finished => 0, iscurrent => 0, busy => 0})->update({ finished => 1, buildstatus => 4, timestamp => time});
  • edit in src/lib/Hydra/Controller/Admin.pm at line 333
    [3.261][3.261:351](),[3.351][3.769:894](),[3.894][3.443:476](),[3.443][3.443:476](),[3.476][3.5668:5670](),[3.5668][3.5668:5670](),[3.5670][2.627:628](),[2.628][3.5670:5671](),[3.5670][3.5670:5671]()
    sub clear_queue : Chained('admin') Path('clear-queue') Args(0) {
    my ($self, $c) = @_;
    # !!! Mark the builds as cancelled instead.
    $c->model('DB::Builds')->search({finished => 0, busy => 0})->delete_all;
    $c->res->redirect("/admin");
    }