This commit is contained in:
Patrick Jentsch 2020-02-14 15:23:02 +01:00
parent fb7d5151ba
commit 545c3ae2ec
3 changed files with 19 additions and 31 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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="preparable"] {
background-color: #ff9800 !important; /* ~materialize orange */
}
.status[data-status="prepared"] {
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="queued"] {
background-color: #2196f3 !important; /* ~materialize blue */
}
.status[data-status="running"] {
background-color: #ffc107 !important; /* ~materialize amber */
}
.status[data-status="start analysis"] {
background-color: #ffeb3b !important; /* ~materialize yellow */
.status[data-status="complete"] {
background-color: #4caf50 !important; /* ~materialize green */
}
.status[data-status="stopping"] {
background-color: #ff5722 !important; /* ~materialize deep-orange */
.status[data-status="prepared"] {
background-color: #4caf50 !important; /* ~materialize green */
}
.status[data-status="start analysis"] {
background-color: #2196f3 !important; /* ~materialize blue */
}
.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 */
}