Commit a6b5e389 authored by Charles's avatar Charles

issue when writing fails with erasing dt

parent b542ef50
......@@ -21,9 +21,9 @@ res <- tryCatch(write_dispo(dt),
# If writing fails, attempt again in 5 minutes
for (i in 1:300) {
if (res == FALSE) {
dt <- data.table(time = Sys.time(),
dt2 <- data.table(time = Sys.time(),
success = FALSE)
fwrite(dt, file = file.path(Sys.getenv("VELOV_CSV"), "logs.csv"),
fwrite(dt2, file = file.path(Sys.getenv("VELOV_CSV"), "logs.csv"),
append = TRUE)
Sys.sleep(5 * 60)
res <- tryCatch(write_dispo(dt),
......
Markdown is supported
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