Fix pep8/flakes results
This commit is contained in:
parent
1c156d213a
commit
3c0490b12a
@ -139,6 +139,7 @@ def execute_to_log(cmd, logfile, timeout=-1,
|
|||||||
|
|
||||||
def process(fd):
|
def process(fd):
|
||||||
""" Write the fd to log """
|
""" Write the fd to log """
|
||||||
|
global last_heartbeat
|
||||||
descriptors[fd]['lines'] += os.read(fd, 1024 * 1024)
|
descriptors[fd]['lines'] += os.read(fd, 1024 * 1024)
|
||||||
# Avoid partial lines by only processing input with breaks
|
# Avoid partial lines by only processing input with breaks
|
||||||
if descriptors[fd]['lines'].find('\n') != -1:
|
if descriptors[fd]['lines'].find('\n') != -1:
|
||||||
@ -177,8 +178,7 @@ def push_file(job_name, file_path, publish_config):
|
|||||||
""" Push a log file to a server. Returns the public URL """
|
""" Push a log file to a server. Returns the public URL """
|
||||||
method = publish_config['type'] + '_push_file'
|
method = publish_config['type'] + '_push_file'
|
||||||
if method in locals():
|
if method in locals():
|
||||||
return locals(method)(job_name, dataset['log_file_path'],
|
return locals(method)(job_name, file_path, publish_config)
|
||||||
publish_config)
|
|
||||||
|
|
||||||
|
|
||||||
def swift_push_file(job_name, file_path, swift_config):
|
def swift_push_file(job_name, file_path, swift_config):
|
||||||
|
@ -46,10 +46,11 @@ def generate_push_results(datasets):
|
|||||||
publish_config))
|
publish_config))
|
||||||
datasets[i]['files'] = files
|
datasets[i]['files'] = files
|
||||||
|
|
||||||
index_file = make_index_file(datasets)
|
#index_file = make_index_file(datasets)
|
||||||
#index_file_url = push_file(index_file)
|
#index_file_url = push_file(index_file)
|
||||||
|
|
||||||
return files[0]
|
return files[0]
|
||||||
|
|
||||||
|
|
||||||
def check_log_for_errors(logfile):
|
def check_log_for_errors(logfile):
|
||||||
return True
|
return True
|
||||||
|
@ -153,7 +153,7 @@ class Runner(threading.Thread):
|
|||||||
result = \
|
result = \
|
||||||
handle_results.check_log_for_errors(dataset['log_file_path'])
|
handle_results.check_log_for_errors(dataset['log_file_path'])
|
||||||
if not result:
|
if not result:
|
||||||
failed = true
|
failed = True
|
||||||
break
|
break
|
||||||
|
|
||||||
if failed:
|
if failed:
|
||||||
@ -282,7 +282,7 @@ class Runner(threading.Thread):
|
|||||||
|
|
||||||
def _send_work_data(self):
|
def _send_work_data(self):
|
||||||
""" Send the WORK DATA in json format for job """
|
""" Send the WORK DATA in json format for job """
|
||||||
self.log.debug("Send the work data response: %s" %
|
self.log.debug("Send the work data response: %s" %
|
||||||
json.dumps(self._get_work_data()))
|
json.dumps(self._get_work_data()))
|
||||||
self.job.sendWorkData(json.dumps(self._get_work_data()))
|
self.job.sendWorkData(json.dumps(self._get_work_data()))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user