Commit cbe28a9f authored by doetschj's avatar doetschj
Browse files

improve time to start processing if no files satisfy the processing keeps...

improve time to start processing if no files satisfy the processing keeps running instead of giving an error
parent b0fc303d
......@@ -63,7 +63,6 @@ def processing(param):
sta_overlap = Stream()
# print(int(str(tparam['Time'])[6:8]))
# if tparam['processing time'] == True:
......@@ -77,10 +76,13 @@ def processing(param):
number2.append(int(number))
condition=int(str(tparam['Time']).replace('_', ''))
number_approved = sorted(i for i in number2 if i >= condition )
index_start_approved=number2.index(number_approved[0])
new_files = new_files1[index_start_approved:]
new_files = []
if number_approved:
index_start_approved = number2.index(number_approved[0])
new_files = new_files1[index_start_approved:]
processed_files = []
while 1:
if len(new_files):
current_file = new_files.pop(0)
......@@ -169,10 +171,11 @@ def processing(param):
number = number + i
number2.append(int(number))
number_approved = sorted(i for i in number2 if i >= condition)
index_start_approved = number2.index(number_approved[0])
flist = flist1[index_start_approved:]
if number_approved:
index_start_approved = number2.index(number_approved[0])
flist = flist1[index_start_approved:]
new_files = [f for f in flist if f not in processed_files]
new_files = [f for f in flist if f not in processed_files]
#print(new_files)
if not len(new_files):
logger.info('Waiting for new files.')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment