diff --git a/rq/worker.py b/rq/worker.py index 1cc9604..99aa953 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -2,7 +2,11 @@ import os import errno import random import time -import procname +try: + from procname import setprocname +except ImportError: + def setprocname(*args, **kwargs): # noqa + pass import socket import signal import traceback @@ -160,7 +164,7 @@ class Worker(object): This can be used to make `ps -ef` output more readable. """ - procname.setprocname('rq: %s' % (message,)) + setprocname('rq: %s' % (message,)) def register_birth(self): # noqa diff --git a/setup.py b/setup.py index acc4209..134d786 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ def get_version(): def get_dependencies(): - deps = ['redis', 'procname', 'times'] + deps = ['redis', 'times'] deps += ['logbook'] # should be soft dependency? if sys.version_info < (2, 7) or \ (sys.version_info >= (3, 0) and sys.version_info < (3, 1)):