def worker(): with Connection(Redis("jobqueue.local")): qs = sys.argv[1:] or ['default'] print("foo") w = Worker(qs) w.work()