SWS-Methodology / faoswsTrade

World trade data processing for the FAO Statistical Working System
http://www.fao.org/economic/ess/ess-home/en/
5 stars 2 forks source link

Writing sometimes fail #163

Closed chrMongeau closed 7 years ago

chrMongeau commented 7 years ago

Sometimes the module fails because it was not possible to save some file of the various reports, and it seems that this happens only temporarily. In other words, while the module runs fine and saves some of the files used for the pre-processing reports, because some temporary issue in saving a file (maybe some latency in the network drive??) the module stops, e.g.,

The plugin started Sun, 1 Oct 2017 13:00:00 +0200 and ended Sun, 1 Oct 2017 13:18:24 +0200 with the following message:

    Error message from R: Error in saveRDS(dataset, file = file.path(datadir, paste0(name, ".rds"))) : 
  error writing to connection

 Stacktrace: 
saveRDS(dataset, file = file.path(datadir, paste0(name, ".rds")))
rprt_writetable(tldata_not_area_in_fcl_mapping)

Maybe a try with some sleep time if the file can not be written should be attempted.