Commit 98e8b1f9 authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team
Browse files

models/task.py: Task timeout is moved to defs.py with the other constants

parent 9aa52e68
......@@ -9,8 +9,6 @@ import datetime
import random
import xmlrpclib
TASK_TIMEOUT = 60 * 60
def schedule_run(id_sequence, id_config):
from subprocess import Popen, PIPE, STDOUT, os
......@@ -54,7 +52,7 @@ def schedule_run(id_sequence, id_config):
program = db.config[id_config].program
##add task to scheduler
task = scheduler.queue_task(program, [id_sequence, id_config, data_id, fuse_id]
, repeats = 1, timeout = TASK_TIMEOUT)
, repeats = 1, timeout = defs.TASK_TIMEOUT)
db.results_file[data_id] = dict(scheduler_task_id = task.id)
filename= db.sequence_file[id_sequence].filename
......
......@@ -47,5 +47,9 @@ DIR_LOG = '/var/vidjil/'
LOG_INFO = DIR_LOG + 'vidjil.log'
LOG_DEBUG = DIR_LOG + 'vidjil-debug.log'
### Timeouts
# Delay in seconds before a task is considered in timeout
TASK_TIMEOUT = 2 * 60 * 60
### Reverse IP file
REVERSE_IP = '/home/vidjil/ips.txt'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment