Skip to content

Commit

Permalink
fix Worker redis_settings error
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Mar 12, 2019
1 parent 183ce56 commit 9848edd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
History
-------

v0.16.0a3 (2010-03-12)
......................
* fix ``Worker`` with custom redis settings

v0.16.0a2 (2010-03-06)
......................
* add ``job_try`` argument to ``enqueue_job``, #113
Expand Down
4 changes: 3 additions & 1 deletion arq/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ async def create_pool(settings: RedisSettings = None, *, _retry: int = 0) -> Arq
except (ConnectionError, OSError, aioredis.RedisError, asyncio.TimeoutError) as e:
if _retry < settings.conn_retries:
logger.warning(
'redis connection error %s %s, %d retries remaining...',
'redis connection error %s:%s %s %s, %d retries remaining...',
settings.host,
settings.port,
e.__class__.__name__,
e,
settings.conn_retries - _retry,
Expand Down
2 changes: 1 addition & 1 deletion arq/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__all__ = ['VERSION']

VERSION = StrictVersion('0.16a2')
VERSION = StrictVersion('0.16a3')
4 changes: 2 additions & 2 deletions arq/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def __init__(
self.health_check_interval = to_seconds(health_check_interval)
self.pool = redis_pool
if self.pool is None:
self.redis_settings = None
else:
self.redis_settings = redis_settings or RedisSettings()
else:
self.redis_settings = None
self.tasks = []
self.main_task = None
self.loop = asyncio.get_event_loop()
Expand Down

0 comments on commit 9848edd

Please sign in to comment.