nopaque/app/tasks/__init__.py

15 lines
345 B
Python

from .corpus_utils import CheckCorporaMixin
from .job_utils import CheckJobsMixin
from ..import db, socketio
import docker
class TaskRunner(CheckCorporaMixin, CheckJobsMixin):
def __init__(self):
self.docker = docker.from_env()
def run(self):
self.check_corpora()
self.check_jobs()
db.session.commit()