resume starts fresh if the first run didn't happen
This commit is contained in:
parent
2c54425726
commit
d7f5abef2d
@ -1288,17 +1288,13 @@ def main():
|
||||
print("Output files exist but are corrupt, deleting and starting fresh.", file=sys.stderr)
|
||||
for filepath in corrupt_files:
|
||||
os.remove(filepath)
|
||||
start_fresh = True
|
||||
else:
|
||||
sys.exit(f"Error: --resume specified but partitioned output not found in: {partition_dir}")
|
||||
start_fresh = True
|
||||
else:
|
||||
if os.path.exists(output_file):
|
||||
# File exists but is corrupt - start fresh
|
||||
print(f"Output file {output_file} exists but is corrupt, starting fresh.", file=sys.stderr)
|
||||
os.remove(output_file)
|
||||
start_fresh = True
|
||||
else:
|
||||
sys.exit(f"Error: --resume specified but output file not found: {output_file}")
|
||||
start_fresh = True
|
||||
else:
|
||||
sys.exit("Error: --resume only works with parquet output (not stdout or TSV)")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user