Browse Source

Fixes benchmark format string

Ask Solem 12 years ago
parent
commit
58fc407137
2 changed files with 2 additions and 4 deletions
  1. 0 2
      celery/utils/log.py
  2. 2 2
      celery/worker/state.py

+ 0 - 2
celery/utils/log.py

@@ -242,8 +242,6 @@ def _patch_logger_class():
 
                 def log(self, *args, **kwargs):
                     if _in_sighandler:
-                        print('CANNOT LOG IN SIGHANDLER',  # noqa
-                              file=sys.__stderr__)
                         return
                     return OldLoggerClass.log(self, *args, **kwargs)
             logging.setLoggerClass(SigSafeLogger)

+ 2 - 2
celery/worker/state.py

@@ -122,8 +122,8 @@ if C_BENCH:  # pragma: no cover
         if not all_count % bench_every:
             now = time()
             diff = now - bench_start
-            print('- Time spent processing %s tasks (since first '
-                  'task received): ~{0:.4f}s\n'.format(bench_every, diff))
+            print('- Time spent processing {0} tasks (since first '
+                  'task received): ~{1:.4f}s\n'.format(bench_every, diff))
             sys.stdout.flush()
             bench_start = bench_last = now
             bench_sample.append(diff)