def main(): for f in os.listdir(LOC): f = os.path.join(LOC, f) if not os.path.exists(f): #file disappeared continue if '.pcap' not in f: continue if os.path.exists(next_filename(f)) or not is_growing(f): print 'upload', f print upload(f)
def main(): for d in answer_dir, query_dir: make_dir(d) work_done = False for f in os.listdir(LOC): f = os.path.join(LOC, f) if not os.path.exists(f): #file disappeared continue if 'processing' in f or 'pcap' not in f: continue if os.path.exists(next_filename(f)) or not is_growing(f): process(f) work_done = True if work_done: client.SearchClient().reopen_files()