mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Only create a TaskRunner object when task execution is triggered by the cli
This commit is contained in:
parent
49e4c837d6
commit
846ba31023
@ -52,6 +52,3 @@ class TaskRunner(CheckCorporaMixin, CheckJobsMixin):
|
||||
for message in self._socketio_message_buffer[room][event]:
|
||||
socketio.emit(event, self._socketio_message_buffer[room][event][message], room=room) # noqa
|
||||
self.clear_socketio_message_buffer()
|
||||
|
||||
|
||||
task_runner = TaskRunner()
|
||||
|
@ -50,7 +50,8 @@ def deploy():
|
||||
|
||||
@app.cli.command()
|
||||
def tasks():
|
||||
from app.tasks import task_runner
|
||||
from app.tasks import TaskRunner
|
||||
task_runner = TaskRunner()
|
||||
task_runner.run()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user