moving thread startup to urls.py