diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-08-24 13:41:54 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-08-24 13:52:43 +0530 |
commit | 16ac10cfc0a441013229406b101fac5f02b26953 (patch) | |
tree | 1b3b6406dddad56d80418ee845515a27d66ba3f4 /src/queue.c | |
parent | 90f0f6d331c0d2bc004f09edc98c1c724b24c41e (diff) |
evanix: add max-time flag
Diffstat (limited to 'src/queue.c')
-rw-r--r-- | src/queue.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/queue.c b/src/queue.c index dbccd66..2474a39 100644 --- a/src/queue.c +++ b/src/queue.c @@ -241,8 +241,15 @@ int queue_thread_new(struct queue_thread **queue_thread, FILE *stream) ret = -errno; goto out_free_qt; } + + if (evanix_opts.max_builds) + qt->queue->resources = evanix_opts.max_builds; + else if (evanix_opts.max_time) + qt->queue->resources = evanix_opts.max_time; + else + qt->queue->resources = 0; + qt->queue->htab = NULL; - qt->queue->resources = evanix_opts.max_builds; qt->queue->jobid = NULL; qt->queue->state = Q_SEM_WAIT; ret = sem_init(&qt->queue->sem, 0, 0); |