Make the job timeout configurable
This commit is contained in:
parent
131967dc39
commit
37b7c568ed
2 changed files with 20 additions and 10 deletions
|
|
@ -70,14 +70,22 @@
|
|||
(lambda (opt name arg result)
|
||||
(alist-cons 'ignore-targets
|
||||
(string-split arg #\,)
|
||||
result)))
|
||||
(option '("timeout") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'timeout
|
||||
(string->number arg)
|
||||
result)))))
|
||||
|
||||
|
||||
(define %default-options
|
||||
;; Alist of default option values
|
||||
`((max-processes . ,default-max-processes)
|
||||
(per-job-parallelism . 1)
|
||||
(ignore-systems . ())
|
||||
(ignore-targets . ())))
|
||||
(ignore-targets . ())
|
||||
(timeout . ,(* (* 60 60) ;; 1 hour in seconds
|
||||
72))))
|
||||
|
||||
(define (parse-options args)
|
||||
(args-fold
|
||||
|
|
@ -130,7 +138,9 @@
|
|||
#:ignore-systems (assq-ref opts 'ignore-systems)
|
||||
#:ignore-targets (assq-ref opts 'ignore-targets)
|
||||
#:free-space-requirement
|
||||
(assq-ref opts 'free-space-requirement)))
|
||||
(assq-ref opts 'free-space-requirement)
|
||||
#:timeout
|
||||
(assq-ref opts 'timeout)))
|
||||
(lambda _
|
||||
(backtrace))))
|
||||
#:unwind? #t))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue