Several implementations of asynchronous task queues in Python using the multiprocessing library and Redis.
-
Fork/Clone
-
Create and activate a virtual environment
-
Install the dependencies
-
Enter the Python shell and download the NLTK
stopwordscorpus:>> import nltk >> nltk.download('stopwords') [nltk_data] Downloading package stopwords to [nltk_data] /Users/michael.herman/nltk_data... [nltk_data] Unzipping corpora/stopwords.zip. True
Multiprocessing Pool:
$ python simple_pool.pyMultiprocessing Queue:
$ python simple_queue.py
$ python simple_task_queue.pyLogging to a single file:
$ python simple_task_queue_logging.pyLogging to separate files:
$ python simple_task_queue_logging_separate_files.pyRedis:
$ python redis_queue.py