diff --git a/app/corpora/views.py b/app/corpora/views.py index 4287446d3818cb1ed3b13957755f90da44d22a09..5b700b94bff2b1c749fe3d52ef476dec4519c9f4 100644 --- a/app/corpora/views.py +++ b/app/corpora/views.py @@ -196,7 +196,7 @@ def prepare_corpus(corpus_id): if not (corpus.creator == current_user or current_user.is_administrator()): abort(403) if len(corpus.files.all()) > 0: - corpus.status = 'preparable' + corpus.status = 'submitted' db.session.commit() flash('Corpus marked for preparation!') else: diff --git a/app/models.py b/app/models.py index e72d786099e3bee28a35a635b33b41786b9af04f..8801519139c43f5bc7109b5c4f09250d81331bd2 100644 --- a/app/models.py +++ b/app/models.py @@ -326,8 +326,8 @@ class Job(db.Model): self.status = 'canceling' db.session.commit() while self.status != 'canceled': - # In case the daemon started a submitted job meanwhile - if self.status == 'running': + # In case the daemon handled a job in any way + if self.status != 'canceling': self.status = 'canceling' db.session.commit() sleep(1) diff --git a/app/static/css/nopaque.css b/app/static/css/nopaque.css index c1c999ad8abc1de0f285e31ce3d4b6f53ecec33a..97b7a7c6e225c19902d6c9c42e2c459dab74a025 100644 --- a/app/static/css/nopaque.css +++ b/app/static/css/nopaque.css @@ -116,42 +116,30 @@ indicator will show up how the column is sorted right now.; */ .status[data-status] { background-color: #f44336 !important; /* ~materialize "red" */ } -.status[data-status="analysing"] { - background-color: #4caf50 !important; /* ~materialize green */ +.status[data-status="unprepared"] { + background-color: #9e9e9e !important; /* ~materialize grey */ } -.status[data-status="complete"] { - background-color: #4caf50 !important; /* ~materialize green */ +.status[data-status="submitted"] { + background-color: #9e9e9e !important; /* ~materialize grey */ } -.status[data-status="pending"] { - background-color: #ff9800 !important; /* ~materialize orange */ +.status[data-status="queued"] { + background-color: #2196f3 !important; /* ~materialize blue */ } -.status[data-status="preparable"] { - background-color: #ff9800 !important; /* ~materialize orange */ +.status[data-status="running"] { + background-color: #ffc107 !important; /* ~materialize amber */ } -.status[data-status="prepared"] { +.status[data-status="complete"] { background-color: #4caf50 !important; /* ~materialize green */ } -.status[data-status="preparing"] { - background-color: #03a9f4 !important; /* ~materialize light-blue */ -} -.status[data-status="removing"] { - background-color: #ff5722 !important; /* ~materialize deep-orange */ -} -.status[data-status="running"] { - background-color: #ffc107 !important; /* ~materialize amber */ +.status[data-status="prepared"] { + background-color: #4caf50 !important; /* ~materialize green */ } .status[data-status="start analysis"] { - background-color: #ffeb3b !important; /* ~materialize yellow */ + background-color: #2196f3 !important; /* ~materialize blue */ } -.status[data-status="stopping"] { - background-color: #ff5722 !important; /* ~materialize deep-orange */ +.status[data-status="analysing"] { + background-color: #4caf50 !important; /* ~materialize green */ } .status[data-status="stop analysis"] { background-color: #ff5722 !important; /* ~materialize deep-orange */ } -.status[data-status="submitted"] { - background-color: #2196f3 !important; /* ~materialize blue */ -} -.status[data-status="unprepared"] { - background-color: #9e9e9e !important; /* ~materialize grey */ -}