Change max assign time

This commit is contained in:
simon987 2019-04-06 12:50:28 -04:00
parent bfb59c5336
commit 6843900ec6
3 changed files with 3 additions and 2 deletions

1
jenkins/Jenkinsfile vendored
View File

@ -39,6 +39,7 @@ pipeline {
sshPut remote: remote, from: 'uwsgi.py', into: 'od-database'
sshPut remote: remote, from: 'views.py', into: 'od-database'
sshPut remote: remote, from: 'config.py', into: 'od-database'
sshPut remote: remote, from: 'do_recrawl.py', into: 'od-database'
sshPut remote: remote, from: 'od-database.ini', into: 'od-database'
sshPut remote: remote, from: 'jenkins/deploy.sh', into: 'od-database'
sshCommand remote: remote, command: 'chmod +x od-database/deploy.sh && ./od-database/deploy.sh'

View File

@ -18,7 +18,7 @@ screen -list
echo "Installing crontab"
absolute_dir=$(cd ${ODDBROOT} && pwd)
command="cd \"${absolute_dir}\" && source env/bin/activate && python do_recrawl.py >> recrawl_logs.txt"
command="cd '${absolute_dir}' && source env/bin/activate && python do_recrawl.py >> recrawl_logs.txt"
job="*/10 * * * * \"$command\""
echo "$job"
cat <(fgrep -i -v \""$command"\" <(crontab -l)) <(echo "$job") | crontab -

View File

@ -140,7 +140,7 @@ class TaskManager:
pool.close()
def queue_task(self, task: Task):
max_assign_time = 24 * 7 * 3600
max_assign_time = 24 * 4 * 3600
upload_token = uuid4().__str__()
task.upload_token = upload_token