Skip to content

Commit

Permalink
check pickles and parquet both
Browse files Browse the repository at this point in the history
  • Loading branch information
rkansal47 committed Nov 10, 2024
1 parent 039ea3e commit 22351af
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions condor/check_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
print(f"Checking {sample}")

if args.processor != "trigger":
# add all files if entire parquet directory is missing
if not Path(f"{eosdir}/{sample}/parquet").exists():
print_red(f"No parquet directory for {sample}!")
if sample not in jdl_dict:
Expand Down Expand Up @@ -129,22 +130,24 @@
print(f"Out pickles: {outs_pickles}")

for i in range(jdl_dict[sample]):
if i not in outs_pickles:
if i not in outs_pickles or (args.processor != "trigger" and i not in outs_parquet):
if f"{args.year}_{sample}_{i}" in running_jobs:
print(f"Job #{i} for sample {sample} is running.")
continue

print_red(f"Missing output pickle #{i} for sample {sample}")
if i not in outs_pickles:
print_red(f"Missing output pickle #{i} for sample {sample}")

if args.processor != "trigger" and i not in outs_parquet:
print_red(f"Missing output parquet #{i} for sample {sample}")

jdl_file = f"condor/{args.processor}/{args.tag}/{args.year}_{sample}_{i}.jdl"
err_file = f"condor/{args.processor}/{args.tag}/logs/{args.year}_{sample}_{i}.err"
missing_files.append(jdl_file)
err_files.append(err_file)
if args.submit_missing:
os.system(f"condor_submit {jdl_file}")

if args.processor != "trigger" and i not in outs_parquet:
print_red(f"Missing output parquet #{i} for sample {sample}")


print(f"{len(missing_files)} files to re-run:")
for f in missing_files:
Expand Down

0 comments on commit 22351af

Please sign in to comment.