Last active
October 31, 2016 16:03
-
-
Save specialunderwear/1c3edddf0f62c96d1f0a092955bf8b7e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[uwsgi] | |
master = true | |
workers = 1 | |
reload-mercy = 30 | |
vacuum = 1 | |
socket = my.sock | |
auto-procname = true | |
enable-threads = true | |
lazy = 0 | |
plugin = python | |
no-orphans = true | |
thunder-lock = false | |
enable-threads = true | |
threads = 0 | |
spooler = . | |
module = uwsgitest:application | |
http = 0.0.0.0:9090 | |
# dev settings | |
python-autoreload = 1 | |
# virtualenv = vul hier je virtualenv als je uwsgi daar in hebt staan | |
virtualenv = /Users/ebone/.virtualenvs/vadain.buildout | |
This file contains hidden or 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
try: | |
from uwsgidecorators import * | |
except ImportError: | |
print "ik ben niet geinstalleerd, misschien ben ik wel niet gebuild(uwsgidecorators)" | |
raise | |
@spool | |
def spam(args): | |
print "ik stuur wat spam", args | |
@cron(-2, -1, -1, -1, -1) | |
def spam_periodic(args): | |
print "ik ben henk" | |
print "goto 10" | |
@timer(2) | |
def spam_really_quick(args): | |
print "ik ben suzanne" | |
print "break" | |
spam.spool(foo='bar',hello='world', target='spooler') | |
def application(env, start_response): | |
start_response('200 OK', [('Content-Type','text/html')]) | |
return [b"Hello World"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
doe maar
wel eerst ff je virtualenv goedzetten voor je dit doet. als je globaal geinstalleerde uwsgi gebruikt kan je virtualenv weglaten.