Statistics
| Branch: | Tag: | Revision:

root / poller / application.py @ d60db93b

History | View | Annotate | Download (464 Bytes)

1
#!/usr/bin/python
2
from gevent import monkey; monkey.patch_all()
3
import os
4
import traceback
5
from django.core.handlers.wsgi import WSGIHandler
6
from django.core.signals import got_request_exception
7
from django.core.management import call_command
8

    
9
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
10

    
11
def exception_printer(sender, **kwargs):
12
    traceback.print_exc()
13

    
14
got_request_exception.connect(exception_printer)
15
call_command('syncdb')
16

    
17
application = WSGIHandler()