Create api lock on the fly

This commit is contained in:
Ruud
2014-06-22 22:41:56 +02:00
parent b11bb9cdac
commit 15980471b0
+4
View File
@@ -91,6 +91,10 @@ class ApiHandler(RequestHandler):
self.write('API call doesn\'t seem to exist')
return
# Create lock if it doesn't exist
if route in api_locks and not api_locks.get(route):
api_locks[route] = threading.Lock()
api_locks[route].acquire()
try: