Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def application(e, s):
s('200 OK', [('Content-Type', 'text/html')])
if e['PATH_INFO'] == '/30':
uwsgi.signal(30)
uwsgi.signal(100)
else:
uwsgi.signal(17)
return "Signal raised"
import uwsgi
# send a raw signal to register with file_monitor subsystem
# uwsgi.signal(10, "/tmp/topolino")
uwsgi.signal(10, "/tmp")
# uwsgi.signal(10, "/root")
# send a raw signal to register with timer subsystem
uwsgi.signal(11, "3")
uwsgi.signal(11, "4")
uwsgi.signal(11, "8")
def application(e, s):
s('200 Ok', [('Content-Type', 'text/html')])
return "<h1>Hello World</h1>"
def mess():
while True:
for i in xrange(0, 100):
if uwsgi.ready():
uwsgi.signal(17)
print(i)
time.sleep(0.1)
def application(e, s):
s('200 OK', [('Content-Type', 'text/html')])
if e['PATH_INFO'] == '/30':
uwsgi.signal(30)
uwsgi.signal(100)
else:
uwsgi.signal(17)
return "Signal raised"
import uwsgi
# send a raw signal to register with file_monitor subsystem
# uwsgi.signal(10, "/tmp/topolino")
uwsgi.signal(10, "/tmp")
# uwsgi.signal(10, "/root")
# send a raw signal to register with timer subsystem
uwsgi.signal(11, "3")
uwsgi.signal(11, "4")
uwsgi.signal(11, "8")
def application(e, s):
s('200 Ok', [('Content-Type', 'text/html')])
return "<h1>Hello World</h1>"
def bg_task():
for i in range(1, 10):
print "background task", i
gevent.sleep(1)
# task ended raise a signal !!!
uwsgi.signal(17)
import uwsgi
# send a raw signal to register with file_monitor subsystem
# uwsgi.signal(10, "/tmp/topolino")
uwsgi.signal(10, "/tmp")
# uwsgi.signal(10, "/root")
# send a raw signal to register with timer subsystem
uwsgi.signal(11, "3")
uwsgi.signal(11, "4")
uwsgi.signal(11, "8")
def application(e, s):
s('200 Ok', [('Content-Type', 'text/html')])
return "<h1>Hello World</h1>"
def sig():
try:
uwsgi.signal(int(request.form['signum']))
flash("uwsgi signal sent")
except:
flash("unable to send signal")
return redirect(url_for('index'))
def controlled_arguments_task(*args, **kwargs):
if args != ({'key': 'value'}, 2) or kwargs != {'key1': 'value1'}:
print("We have a problem!")
open(ghostpath, 'w').close()
uwsgi.signal(20)