Skip to content

Commit 4619034

Browse files
committed
Fix review feedback
diff --git a/readthedocs/builds/syncers.py b/readthedocs/builds/syncers.py index 7b61bb6..3c8af91 100644 --- a/readthedocs/builds/syncers.py +++ b/readthedocs/builds/syncers.py @@ -140,8 +140,7 @@ class RemotePuller(object): ) ret = os.system(sync_cmd) if ret != 0: - log.error("COPY ERROR to app servers. Return code: {}".format(ret)) - log.error("COPY ERROR command run: {}".format(sync_cmd)) + log.error("COPY ERROR to app servers. Command: [{}] Return: [{}]".format(sync_cmd, ret)) class Syncer(SettingsOverrideObject): diff --git a/readthedocs/core/utils/__init__.py b/readthedocs/core/utils/__init__.py index 10d8656..fca8e13 100644 --- a/readthedocs/core/utils/__init__.py +++ b/readthedocs/core/utils/__init__.py @@ -30,7 +30,10 @@ def broadcast(type, task, args, kwargs=None, callback=None): # pylint: disable= """ Run a broadcast across our servers. - Returns the task results for each task that was run. + Returns a task group that can be checked for results. + + `callback` should be a task signature that will be run once, + after all of the broadcast tasks have finished running. """ assert type in ['web', 'app', 'build'] if kwargs is None: @@ -47,10 +50,8 @@ def broadcast(type, task, args, kwargs=None, callback=None): # pylint: disable= tasks.append(task_sig) if callback: task_promise = chord(tasks)(callback).get() - log.debug('Sent Chord: {}'.format(locals())) else: task_promise = group(*tasks).apply_async() - log.debug('Sent Group: {}'.format(locals())) return task_promise diff --git a/readthedocs/settings/dev.py b/readthedocs/settings/dev.py index 8c39e12..e605f2c 100644 --- a/readthedocs/settings/dev.py +++ b/readthedocs/settings/dev.py @@ -56,7 +56,7 @@ class CommunityDevSettings(CommunityBaseSettings): def LOGGING(self): # noqa - avoid pep8 N802 logging = super(CommunityDevSettings, self).LOGGING logging['formatters']['default']['format'] = '[%(asctime)s] ' + self.LOG_FORMAT - logging['handlers']['console']['level'] = 'DEBUG' + # Remove double logging logging['loggers']['']['handlers'] = [] return logging
1 parent ae147c8 commit 4619034

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

readthedocs/builds/syncers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ def copy(cls, path, target, host, is_file=False, **__):
140140
)
141141
ret = os.system(sync_cmd)
142142
if ret != 0:
143-
log.error("COPY ERROR to app servers. Return code: {}".format(ret))
144-
log.error("COPY ERROR command run: {}".format(sync_cmd))
143+
log.error("COPY ERROR to app servers. Command: [{}] Return: [{}]".format(sync_cmd, ret))
145144

146145

147146
class Syncer(SettingsOverrideObject):

readthedocs/core/utils/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ def broadcast(type, task, args, kwargs=None, callback=None): # pylint: disable=
3030
"""
3131
Run a broadcast across our servers.
3232
33-
Returns the task results for each task that was run.
33+
Returns a task group that can be checked for results.
34+
35+
`callback` should be a task signature that will be run once,
36+
after all of the broadcast tasks have finished running.
3437
"""
3538
assert type in ['web', 'app', 'build']
3639
if kwargs is None:
@@ -47,10 +50,8 @@ def broadcast(type, task, args, kwargs=None, callback=None): # pylint: disable=
4750
tasks.append(task_sig)
4851
if callback:
4952
task_promise = chord(tasks)(callback).get()
50-
log.debug('Sent Chord: {}'.format(locals()))
5153
else:
5254
task_promise = group(*tasks).apply_async()
53-
log.debug('Sent Group: {}'.format(locals()))
5455
return task_promise
5556

5657

readthedocs/settings/dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def DATABASES(self): # noqa
5656
def LOGGING(self): # noqa - avoid pep8 N802
5757
logging = super(CommunityDevSettings, self).LOGGING
5858
logging['formatters']['default']['format'] = '[%(asctime)s] ' + self.LOG_FORMAT
59-
logging['handlers']['console']['level'] = 'DEBUG'
59+
# Remove double logging
6060
logging['loggers']['']['handlers'] = []
6161
return logging
6262

0 commit comments

Comments
 (0)