Exemplo n.º 1
0
	def handle(self, *args, **kwargs):
		butler = get_current_butler()
		if not butler.applications:
			register()
			butler = get_current_butler()
		job = butler.get_job()
		if not job: 
			return
		if butler.current_job != job:
			butler.current_job = job 
			butler.save()
		print os.path.abspath(os.path.join(BUTLER_APPS_DIRECTORY, job.application))
Exemplo n.º 2
0
	def handle(self, *args, **kwargs):
		butler = get_current_butler()
		job = butler.current_job
		if job:
			job.error()
			
			butler.current_job = None 
			butler.save()	
Exemplo n.º 3
0
	def handle(self, *args, **kwargs):
		variable = args[0]
		job = None
		try:
			butler = worker.get_current_butler()
			job = butler.current_job
		except:
			pass 
		print Variable(variable).resolve(Context({
			'settings': settings,
			'job': job,
		}))
Exemplo n.º 4
0
	def handle(self, *args, **kwargs):
	
		if args:
			data = ' '.join(args)
		else:
			import sys 
			lines = sys.stdin.readlines()
			data = '\n'.join(lines)
		
		if data:
			butler = get_current_butler()
			butler.output(data)
Exemplo n.º 5
0
	def handle(self, *args, **kwargs):
		butler = get_current_butler()
		job = butler.current_job
		if job:
			job.status = args[0]
			job.save()