Skip to content

Instantly share code, notes, and snippets.

View LutzSteinborn's full-sized avatar

Lutz LutzSteinborn

View GitHub Profile
@LutzSteinborn
LutzSteinborn / tornado_continuous_reload.py
Created June 7, 2016 13:45 — forked from renaud/tornado_continuous_reload.py
Example of Tornado that autoreloads/watches all files in folder 'static'
'''
Example of Tornado that autoreloads/watches all files in folder 'static'
'''
import tornado.ioloop
import tornado.web
import tornado.autoreload
import os
''' serves index.html'''
@LutzSteinborn
LutzSteinborn / start-celery-for-dev.py
Created June 5, 2016 10:25 — forked from chenjianjx/start-celery-for-dev.py
A python script which starts celery worker and auto reload it when any code change happens.
'''
A python script which starts celery worker and auto reload it when any code change happens.
I did this because Celery worker's "--autoreload" option seems not working for a lot of people.
'''
import time
from watchdog.observers import Observer ##pip install watchdog
from watchdog.events import PatternMatchingEventHandler
import psutil ##pip install psutil
import os