Fix a few concatenated strings that don't have to be ()

main
Rob Hudson committed by GitHub
parent c2bec19b09
commit 10230ff040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -893,7 +893,7 @@ class Queue:
kwargs (*kwargs): function kargs
"""
if not isinstance(f, str) and f.__module__ == '__main__':
raise ValueError('Functions from the __main__ module cannot be processed ' 'by workers')
raise ValueError('Functions from the __main__ module cannot be processed by workers')
# Detect explicit invocations, i.e. of the form:
# q.enqueue(foo, args=(1, 2), kwargs={'a': 1}, job_timeout=30)

@ -60,7 +60,7 @@ class BaseDeathPenalty:
class UnixSignalDeathPenalty(BaseDeathPenalty):
def handle_death_penalty(self, signum, frame):
raise self._exception('Task exceeded maximum timeout value ' '({0} seconds)'.format(self._timeout))
raise self._exception('Task exceeded maximum timeout value ({0} seconds)'.format(self._timeout))
def setup_death_penalty(self):
"""Sets up an alarm signal and a signal handler that raises

@ -653,7 +653,7 @@ class BaseWorker:
connection: Union[Redis, 'Pipeline'] = pipeline if pipeline is not None else self.connection
connection.expire(self.key, timeout)
connection.hset(self.key, 'last_heartbeat', utcformat(utcnow()))
self.log.debug('Sent heartbeat to prevent worker timeout. ' 'Next one should arrive in %s seconds.', timeout)
self.log.debug('Sent heartbeat to prevent worker timeout. Next one should arrive in %s seconds.', timeout)
class Worker(BaseWorker):
@ -947,7 +947,7 @@ class Worker(BaseWorker):
if self.get_state() == WorkerStatus.BUSY:
self._stop_requested = True
self.set_shutdown_requested_date()
self.log.debug('Stopping after current horse is finished. ' 'Press Ctrl+C again for a cold shutdown.')
self.log.debug('Stopping after current horse is finished. Press Ctrl+C again for a cold shutdown.')
if self.scheduler:
self.stop_scheduler()
else:

Loading…
Cancel
Save