diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-04-15 16:26:34 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-04-15 20:25:49 +0300 |
commit | 2cc5b63b5f90d2dd9b05f50ac28e379d417f1a8c (patch) | |
tree | 38238377b042a159fb9bf633e7b8e3853f0fd980 /src/process.c | |
parent | 44ad5cfe84f1cd1d7b6de35ae251f1caf69450d8 (diff) | |
download | wydawca-2cc5b63b5f90d2dd9b05f50ac28e379d417f1a8c.tar.gz wydawca-2cc5b63b5f90d2dd9b05f50ac28e379d417f1a8c.tar.bz2 |
Use job scheduler when processing all spools.alpha-3.1.90
* src/job.c (job_printable): Improve job identification.
(wydawca_scanner): Don't log statistics in single process mode.
(job_queue_wait): New function.
* src/net.c (wydawca_listener): Move the call to job_init to main.
* src/process.c (scan_spool_unlocked): Enqueue the triplet.
Don't call spool_commit_triplets
* src/triplet.c (remove_triplet): Omit checks in dry-run mode.
(triplet_processor,spool_commit_triplets)
(count_collected_triplets): Remove.
* src/wydawca.c (main): Call job_queue_wait if not daemon.
* tests/inotify-unatt01.at: Update expected output.
* tests/upload-dry.at: Likewise.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c index 9fdaa5f..4c14fd5 100644 --- a/src/process.c +++ b/src/process.c @@ -187,14 +187,11 @@ scan_spool_unlocked(struct spool *spool) if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; - spool_add_new_file(spool, ent->d_name); + triplet_enqueue(spool_add_new_file(spool, ent->d_name)); } closedir(dir); - if (count_collected_triplets() > 0) - spool_commit_triplets(spool); - timer_stop(spool->tag); timer_stop("spool"); } |