diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-07-19 08:29:26 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-07-19 08:29:33 +0530 |
commit | cf02c0ac1b7d8ed930a03339f639f819b3ad127b (patch) | |
tree | 34c4dbc359b469ca002f60ca9d3b0f0528d0944a /src/jobs.c | |
parent | 7d2e561246ed29eca19fe2a666ec2ae6e94964ad (diff) |
evanix: add --cache-status flag
Diffstat (limited to 'src/jobs.c')
-rw-r--r-- | src/jobs.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -388,9 +388,11 @@ int job_read(FILE *stream, struct job **job) if (ret < 0) goto out_free; - ret = job_read_cache(j); - if (ret < 0) - goto out_free; + if (evanix_opts.cache_status) { + ret = job_read_cache(j); + if (ret < 0) + goto out_free; + } out_free: cJSON_Delete(root); @@ -441,8 +443,6 @@ static int job_new(struct job **j, char *name, char *drv_path, char *attr, return -errno; } job->scheduled = false; - /* unset by job_read_cache() */ - job->stale = true; job->reported = false; job->id = -1; @@ -458,6 +458,13 @@ static int job_new(struct job **j, char *name, char *drv_path, char *attr, job->parents_filled = 0; job->parents = NULL; + if (evanix_opts.cache_status) { + job->stale = true; + } else { + job->insubstituters = false; + job->stale = false; + } + if (attr != NULL) { job->nix_attr_name = strdup(attr); if (job->nix_attr_name == NULL) { |