From 3323b2c6e9cf9d34ab60c0845adce360255e6d39 Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Thu, 22 Feb 2018 16:53:27 -0700 Subject: [PATCH 1/2] Hotfix for adding logging call back into project sync task It exists in subclasses, but we should refactor it out anyways. --- readthedocs/projects/tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/readthedocs/projects/tasks.py b/readthedocs/projects/tasks.py index 6a5342f3b2c..bfc7c8db368 100644 --- a/readthedocs/projects/tasks.py +++ b/readthedocs/projects/tasks.py @@ -151,6 +151,16 @@ def sync_repo(self): except Exception: log.exception('Unknown Sync Versions Exception') + # TODO this is duplicated in the classes below, and this should be + # refactored out anyways, as calling from the method removes the original + # caller from logging. + def _log(self, msg): + log.info(LOG_TEMPLATE + .format(project=self.project.slug, + version=self.version.slug, + msg=msg)) + + class SyncRepositoryTask(SyncRepositoryMixin, Task): From 6e6da87e6c81afb58b081e1203748a617c15e16c Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Fri, 23 Feb 2018 10:42:39 -0500 Subject: [PATCH 2/2] Minor lint fixed --- readthedocs/projects/tasks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/readthedocs/projects/tasks.py b/readthedocs/projects/tasks.py index bfc7c8db368..67f5891bd33 100644 --- a/readthedocs/projects/tasks.py +++ b/readthedocs/projects/tasks.py @@ -161,7 +161,6 @@ def _log(self, msg): msg=msg)) - class SyncRepositoryTask(SyncRepositoryMixin, Task): """Entry point to synchronize the VCS documentation."""