Cancel an already executing task in Python RQ?
问题 I am using http://python-rq.org/ to queue and execute tasks on Heroku worker dynos. These are long-running tasks and occasionally I need to cancel them in mid-execution. How do I do that from Python? from redis import Redis from rq import Queue from my_module import count_words_at_url q = Queue(connection=Redis()) result = q.enqueue( count_words_at_url, 'http://nvie.com') and later in a separate process I want to do: from redis import Redis from rq import Queue from my_module import count