From 0c96ef64df2abd15082b7ee49fbd40fe178953a6 Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Sep 14 2021 13:44:37 +0000 Subject: frontend: log pending build records only when debugging Today we almost ran out of disk space on copr-frontend because we are mass-rebuilding rubygems, and periodically logging all pending builds resulted in 20G `copr-frontend.log`. I think we can simply log the number of pending builds instead of their whole records. That might be useful for debugging though, so I am keeping the original command but switching it from `log.info` to `log.debug`. --- diff --git a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py index 8291bfb..67b6032 100644 --- a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py +++ b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py @@ -313,7 +313,8 @@ def pending_jobs(): if build_ready(task.build)] ) - log.info('Selected build records: {}'.format(build_records)) + log.info('Number of selected build records: %s', len(build_records)) + log.debug('Selected build records: %s', build_records) return flask.jsonify(build_records)