mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 08:41:00 +00:00
Do not print "Scheduling 0 handled" unless settings.DEBUG is on (#636)
This commit is contained in:
parent
671807beb8
commit
b003af64cc
1 changed files with 3 additions and 3 deletions
|
@ -163,9 +163,9 @@ class StatorRunner:
|
||||||
"""
|
"""
|
||||||
with sentry.start_transaction(op="task", name="stator.run_scheduling"):
|
with sentry.start_transaction(op="task", name="stator.run_scheduling"):
|
||||||
for model in self.models:
|
for model in self.models:
|
||||||
print(
|
num = self.handled.get(model._meta.label_lower, 0)
|
||||||
f"{model._meta.label_lower}: Scheduling ({self.handled.get(model._meta.label_lower, 0)} handled)"
|
if num or settings.DEBUG:
|
||||||
)
|
print(f"{model._meta.label_lower}: Scheduling ({num} handled)")
|
||||||
self.submit_stats(model)
|
self.submit_stats(model)
|
||||||
model.transition_clean_locks()
|
model.transition_clean_locks()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue