Despite uploading a HTML file by FTP takes a very short time only, I 
experience an HTML error or empty or incomplete page surprisingly often. 
And the Google and Ahrefs crawlers report such problems, too.

Unfortunately, FTP does not behave like Linux, where it is possible to 
replace one file by another in one single atomic action.

The FTP driver of WeeWX removes the old version of the file first, then 
uploads the new version. During the upload the web server delivers an 
incomplete page.

I wondered what I can do about it.

The first idea was to change ftpupload.py a little bit and upload the file 
with `.tmp` at the end. When the upload is completed, the old version of 
the file is removed and the uploaded file is renamed. So the file that the 
web server delivers is never any more incomplete. But the file can still be 
missing. That is within the time between the remove and the rename command.

Does someone know a real or at least better solution?

I am looking for something that does not require to change a core WeeWX 
file.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e73eccc8-ab3e-4072-a6e7-c884acf540b4n%40googlegroups.com.

Reply via email to