def post(self): op = self.get_argument('op','') if op=='show': name = self.get_argument('name','') job = Job.get_job_fromdb(name) self.write('<pre>%s</pre>' %str(job)) return title = '任务配置' #需要先从azkaban登陆 session_id = self.get_argument('session_id','') login_user = self.get_argument('login_user','') if session_id=='' or login_user=='': self.render('to_login.html') return #参数 query_name = self.get_argument('query_name','') query_project_name = self.get_argument('query_project_name','') query_server_host = self.get_argument('query_server_host','') query_user = self.get_argument('query_user','') #任务 name = self.get_argument('name','') job = Job() if name !='': job = Job.get_job_fromdb(name) projects = Job.get_projects(login_user) jobs = Job.get_alljobs(login_user=login_user) all_jobs = Job.get_alljobs() query_dict = { 'query_name':query_name, 'query_project_name':query_project_name, 'query_server_host':query_server_host, 'query_user':query_user, 'session_id':session_id, 'login_user':login_user } logging.info('to update job [%s]' % name) self.render('to_update.html',title=title,job=job,jobs=jobs,all_jobs=all_jobs,projects=projects,query_dict=query_dict,azkaban_url=azkaban_url)
def post(self): #任务 name = self.get_argument('name','') logging.info('----name:[%s]' % name) job = None try: job = Job.get_job_fromdb(name) except: pass if job==None: self.write('non_exist') else: self.write('exist')
def post(self): #任务 name = self.get_argument('name', '') logging.info('----name:[%s]' % name) job = None try: job = Job.get_job_fromdb(name) except: pass if job == None: self.write('non_exist') else: self.write('exist')
def post(self): title = '任务配置' #需要先从azkaban登陆 session_id = self.get_argument('session_id', '') login_user = self.get_argument('login_user', '') if session_id == '' or login_user == '': self.render('to_login.html') return #参数 query_name = self.get_argument('query_name', '') query_project_name = self.get_argument('query_project_name', '') query_server_host = self.get_argument('query_server_host', '') query_user = self.get_argument('query_user', '') #任务删除 name = self.get_argument('name', '') job = Job.get_job_fromdb(name) #job = Job() #job.name = name job.updater = login_user job.delete_dependencies() job.delete_job() #列表 jobs = Job.get_alljobs(query_name, query_project_name, query_server_host, query_user, login_user) query_dict = { 'query_name': query_name, 'query_project_name': query_project_name, 'query_server_host': query_server_host, 'query_user': query_user, 'session_id': session_id, 'login_user': login_user } logging.info('[%s] delete job [%s]' % (login_user, name)) self.render('list.html', title=title, jobs=jobs, query_dict=query_dict, azkaban_url=azkaban_url)
def post(self): title = '任务配置' #需要先从azkaban登陆 session_id = self.get_argument('session_id','') login_user = self.get_argument('login_user','') if session_id=='' or login_user=='': self.render('to_login.html') return #参数 query_name = self.get_argument('query_name','') query_project_name = self.get_argument('query_project_name','') query_server_host = self.get_argument('query_server_host','') query_user = self.get_argument('query_user','') #任务删除 name = self.get_argument('name','') job = Job.get_job_fromdb(name) #job = Job() #job.name = name job.updater = login_user job.delete_dependencies() job.delete_job() #列表 jobs = Job.get_alljobs(query_name,query_project_name,query_server_host,query_user,login_user) query_dict = { 'query_name':query_name, 'query_project_name':query_project_name, 'query_server_host':query_server_host, 'query_user':query_user, 'session_id':session_id, 'login_user':login_user } logging.info('[%s] delete job [%s]' % (login_user,name)) self.render('list.html',title=title,jobs=jobs,query_dict=query_dict,azkaban_url=azkaban_url)