diff piecrust/baking/baker.py @ 979:45ad976712ec

tests: Big push to get the tests to pass again. - Lots of fixes everywhere in the code. - Try to handle debug logging in the multiprocessing worker pool when running in pytest. Not perfect, but usable for now. - Replace all `.md` test files with `.html` since now a auto-format extension always sets the format. - Replace `out` with `outfiles` in most places since now blog archives are added to the bake output and I don't want to add expected outputs for blog archives everywhere.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 29 Oct 2017 22:51:57 -0700
parents bbf5a96b56db
children 8adc27285d93
line wrap: on
line diff
--- a/piecrust/baking/baker.py	Sun Oct 29 22:46:41 2017 -0700
+++ b/piecrust/baking/baker.py	Sun Oct 29 22:51:57 2017 -0700
@@ -225,17 +225,20 @@
             src = ppinfo.source
             pp = ppinfo.pipeline
 
-            logger.debug(
-                "Queuing jobs for source '%s' using pipeline '%s' "
-                "(%s, step 0)." %
-                (src.name, pp.PIPELINE_NAME, realm_name))
-
             next_step_jobs[src.name] = []
             jcctx = PipelineJobCreateContext(pp_pass_num, record_histories)
             jobs = pp.createJobs(jcctx)
             if jobs is not None:
-                job_count += len(jobs)
+                new_job_count = len(jobs)
+                job_count += new_job_count
                 pool.queueJobs(jobs)
+            else:
+                new_job_count = 0
+
+            logger.debug(
+                "Queued %d jobs for source '%s' using pipeline '%s' "
+                "(%s, step 0)." %
+                (new_job_count, src.name, pp.PIPELINE_NAME, realm_name))
 
         stats.stepTimer('WorkerTaskPut', time.perf_counter() - start_time)