#!/usr/bin/env python2.6
import sys
import os
import glob
from joblib import get_job_session, JobResult, JobDispatcher

if len(sys.argv) < 2:
	print 'Syntax: %s <stage>' % (sys.argv[0])
	sys.exit(1)

stage = sys.argv[1]

jobsession = get_job_session()

jobresult = JobResult.get_configured_jobresult(jobsession, True)

if jobresult == None:
	print 'Job result not found.'
	sys.exit(1)

dispatcher = JobDispatcher(jobresult)
dispatcher.run_stage(stage)

jobsession.commit()

sys.exit(0)

488fe01dc328b7ca0c0492886608ced1125b2c37
#!/usr/bin/env python2.6
import sys
import os
import glob
from joblib import get_job_session, JobResult, JobDispatcher

if len(sys.argv) < 2:
	print 'Syntax: %s <stage>' % (sys.argv[0])
	sys.exit(1)

stage = sys.argv[1]

jobsession = get_job_session()

jobresult = JobResult.get_configured_jobresult(jobsession, True)

if jobresult == None:
	print 'Job result not found.'
	sys.exit(1)

dispatcher = JobDispatcher(jobresult)
dispatcher.run_stage(stage)

jobsession.commit()

sys.exit(0)
