diff --git a/rq/queue.py b/rq/queue.py index e0e48c5..fc3bd47 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -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) diff --git a/rq/timeouts.py b/rq/timeouts.py index a8a408c..12eef56 100644 --- a/rq/timeouts.py +++ b/rq/timeouts.py @@ -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 diff --git a/rq/worker.py b/rq/worker.py index 44d5204..7b16cc0 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -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: