Skip to content

Commit

Permalink
Set rq redis connection by url.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaefer committed Dec 18, 2023
1 parent f672eed commit 6b6f3d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beetsplug/store/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def job_failed(job, connection, *args, **kwargs):

class Task:
def __init__(self):
self.q = Queue(connection=Redis())
redis_url = os.getenv('BEETS_REDIS_URL', 'redis://localhost:6379')
self.q = Queue(connection=Redis.from_url(redis_url))

def run(self, name='bundle', arguments=None):
return self.q.enqueue(globals()[name], arguments,
Expand Down

0 comments on commit 6b6f3d0

Please sign in to comment.