Skip to content

Instantly share code, notes, and snippets.

@specialunderwear
Last active October 31, 2016 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save specialunderwear/1c3edddf0f62c96d1f0a092955bf8b7e to your computer and use it in GitHub Desktop.
Save specialunderwear/1c3edddf0f62c96d1f0a092955bf8b7e to your computer and use it in GitHub Desktop.
[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
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"]
@specialunderwear
Copy link
Author

doe maar

uwsgi --ini uwsgi.conf

wel eerst ff je virtualenv goedzetten voor je dit doet. als je globaal geinstalleerde uwsgi gebruikt kan je virtualenv weglaten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment