This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Gunicorn config file. | |
by HacKan (https://hackan.net) | |
Find it at: https://gist.github.com/HacKanCuBa/275bfca09d614ee9370727f5f40dab9e | |
Based on: https://gist.github.com/KodeKracker/6bc6a3a35dcfbc36e2b7 | |
Changelog | |
========= | |
See revisions to access other versions of this file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
import signal | |
import sys | |
def when_ready(server): | |
if server.worker_class.__name__ != 'GeventWorker': | |
server.log.info('Skipping code reloading since worker is not gevent.') | |
return | |
def monitor(): |