Infer information from Tweets. Useful for human-centered computing tasks, such as sentiment analysis, location prediction, authorship profiling and more!
Instead of spending time logging during the request (blocking the main IO loop), add the log message to a multiprocessing queue to be taken care of by another process.
The back-end for the queue can either be a flat-file like it is currently, but that can be changed in the future to use a database relatively easily.
Be sure to handle the web server shutting down so that the log-writer process can be joined to while it finished logging messages from the queue.
Instead of spending time logging during the request (blocking the main IO loop), add the log message to a multiprocessing queue to be taken care of by another process.
The back-end for the queue can either be a flat-file like it is currently, but that can be changed in the future to use a database relatively easily.
Be sure to handle the web server shutting down so that the log-writer process can be joined to while it finished logging messages from the queue.