Skip to content

Commit 5c9c82b

Browse files
committed
add lock to combine_daily_reports
1 parent 36aef48 commit 5c9c82b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/combine_daily_reports_v1.0.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if !(args["overwrite"] || !isfile(output_fn) || (filesize(output_fn)==0))
5050
@error "Can't overwrite " output_filename=output_fn
5151
exit(1)
5252
else
53-
#touch(output_fn) # Should we create empty file as a lock?
53+
touch(output_fn) # Should we create empty file as a lock?
5454
end
5555

5656
@info "# Loading packages"
@@ -62,7 +62,10 @@ files1 = glob([r"\d{2}",args["input_filename"]],args["input_path"])
6262
files2 = glob([r"\d{2}",r"\d{2}",args["input_filename"]],args["input_path"])
6363
files3 = glob([r"\d{4}",r"\d{2}",r"\d{2}",args["input_filename"]],args["input_path"])
6464
files = vcat(files1,files2,files3)
65-
@assert length(files) >= 1
65+
if !(length(files) >= 1)
66+
@warn "No files found."
67+
exit()
68+
end
6669

6770
if !isnothing(args["exclude_filename"]) && isfile(args["exclude_filename"]) && (filesize(args["exclude_filename"])>0)
6871
@info "# Reading days to exclude."

0 commit comments

Comments
 (0)