diff --git a/neuropower/.sync-config.cson b/neuropower/.sync-config.cson new file mode 100644 index 0000000..ab932dc --- /dev/null +++ b/neuropower/.sync-config.cson @@ -0,0 +1,19 @@ +remote: + host: "aws" + user: "ec2-user" + path: "/home/ec2-user/neuropower-web/neuropower" +behaviour: + uploadOnSave: false + syncDownOnOpen: false + forgetConsole: false + autoHideConsole: true + alwaysSyncAll: false +option: + deleteFiles: false + exclude: [ + ".sync-config.cson" + ".git" + "node_modules" + "tmp" + "vendor" + ] diff --git a/neuropower/apps/designtoolbox/views.py b/neuropower/apps/designtoolbox/views.py index 6da2463..a0f9fff 100644 --- a/neuropower/apps/designtoolbox/views.py +++ b/neuropower/apps/designtoolbox/views.py @@ -22,6 +22,7 @@ import StringIO import shutil import urllib2 +import datetime as dt from datetime import datetime from celery import task from celery.task.control import revoke, inspect @@ -590,7 +591,10 @@ def runGA(request): else: desdata = DesignModel.objects.filter(SID=sid).last() runform = DesignRunForm(None, instance=desdata) - res = GeneticAlgorithm.delay(sid) + #maximum queue: 2 days + expires = int(2 * 24 * 60.) + + res = GeneticAlgorithm.apply_async(args=[sid],expires=expires) form = runform.save(commit=False) form.taskID = res.task_id form.timestamp = str(datetime.now())