Fix race between hydra-eval-jobs and hydra-update-gc-roots

If hydra-eval-jobs creates a new root, and hydra-update-gc-roots runs before hydra-evaluator has had a chance to add the corresponding build to the database, then hydra-update-gc-roots will remove the root. If subsequently the Nix garbage collector kicks in, it may remove the build's .drv file before the build is performed. Since evaluation of the Nixpkgs and NixOS jobsets nowadays takes a lot of time (e.g. an hour), the probability of this happening is fairly high.

The quick fix is not to delete roots that are less than a day old. So long as evaluation doesn't take longer than a day, this should be fine ;-)

Fixes #166.

Created by  Eelco Dolstra  on July 14, 2014
3D3F5I744YILPYZYZQHGADFNYIM7RESDLSCDULH5WVIIPTYD5GYQC
Change contents