Scripts do not execute when "lock" is "true"
Opened this issue · 0 comments
Deleted user commented
There's a typo in scripts.py on line 103:
with (yield gen.Task(self.lock.aquire)):
should be
with (yield gen.Task(self.lock.acquire)):
Without the 'c' in there, it fails, and returns a 500. Put it back and try again, and it fails for a different reason:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1055, in _stack_context_handle_exception
raise_exc_info((type, value, traceback))
File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1178, in wrapper
result = method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 154, in wrapper
runner.run()
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 508, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/lib/python2.7/site-packages/pyjojo/handlers.py", line 241, in post
retcode, stdout = yield gen.Task(script.execute, self.params)
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 534, in run
self.yield_point.start(self)
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 378, in start
self.func(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 154, in wrapper
runner.run()
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 508, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/lib/python2.7/site-packages/pyjojo/scripts.py", line 103, in execute
with (yield gen.Task(self.lock.acquire)):
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 534, in run
self.yield_point.start(self)
File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 378, in start
self.func(*self.args, **self.kwargs)
TypeError: acquire() got an unexpected keyword argument 'callback'
I don't know enough about Tornado to understand how (presumably) that @gen.engine decorator handles the function it's given, but something here is broken.