Accidental refactor, split out legacy.py into separate sumodules and update all call sites.
This commit is contained in:
parent
2109d24483
commit
3efaa255e8
92 changed files with 4458 additions and 4269 deletions
|
@ -23,7 +23,7 @@ def archive_redis_buildlogs():
|
|||
avoid needing two-phase commit. """
|
||||
try:
|
||||
# Get a random build to archive
|
||||
to_archive = model.archivable_buildlogs_query().order_by(db_random_func()).get()
|
||||
to_archive = model.build.archivable_buildlogs_query().order_by(db_random_func()).get()
|
||||
logger.debug('Archiving: %s', to_archive.uuid)
|
||||
|
||||
length, entries = build_logs.get_log_entries(to_archive.uuid, 0)
|
||||
|
|
|
@ -15,9 +15,9 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
class NotificationWorker(Worker):
|
||||
def process_queue_item(self, job_details):
|
||||
notification_uuid = job_details['notification_uuid'];
|
||||
notification_uuid = job_details['notification_uuid']
|
||||
|
||||
notification = model.get_repo_notification(notification_uuid)
|
||||
notification = model.notification.get_repo_notification(notification_uuid)
|
||||
if not notification:
|
||||
# Probably deleted.
|
||||
return
|
||||
|
@ -29,10 +29,10 @@ class NotificationWorker(Worker):
|
|||
event_handler = NotificationEvent.get_event(event_name)
|
||||
method_handler = NotificationMethod.get_method(method_name)
|
||||
except InvalidNotificationMethodException as ex:
|
||||
logger.exception('Cannot find notification method: %s' % ex.message)
|
||||
logger.exception('Cannot find notification method: %s', ex.message)
|
||||
raise JobException('Cannot find notification method: %s' % ex.message)
|
||||
except InvalidNotificationEventException as ex:
|
||||
logger.exception('Cannot find notification event: %s' % ex.message)
|
||||
logger.exception('Cannot find notification event: %s', ex.message)
|
||||
raise JobException('Cannot find notification event: %s' % ex.message)
|
||||
|
||||
method_handler.perform(notification, event_handler, job_details)
|
||||
|
|
Reference in a new issue