Statistics
| Branch: | Tag: | Revision:

root / poller / application.py @ 3e99e2d1

History | View | Annotate | Download (465 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

    
16
call_command('syncdb')
17

    
18
application = WSGIHandler()