Changeset - 96572d330bc4
[Not reviewed]
default
0 1 0
Luca Allulli (luca) - 3 years ago 2018-07-21 11:34:42
luca@skeed.it
* Mercury: jobs: use current interpreter to launch jobs
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
mercury/management/commands/jobs.py
Show inline comments
...
 
@@ -29,6 +29,7 @@ from servizi.utils import datetime2time
 
from django.db.models import Q
 
from mercury.models import *
 
import traceback
 
import sys
 

 
config = {
 
	'allow_public_attrs': True,
...
 
@@ -85,7 +86,7 @@ class Command(BaseCommand):
 
						j.action = 'S'
 
					j.save()
 

 
					command = "python manage.py run_job %s" % j.function
 
					command = "%s manage.py run_job %s" % (sys.executable, j.function)
 
					print "Lancio %s" % j.function
 
					print subprocess.Popen(command.split())
 

0 comments (0 inline, 0 general)