> I am not sure that it is even possible for the file to be in a state that > would cause a problem when the weewx service tries to read it.
If you are saying that you don’t think it’s possible for the file to be read in an inconsistent state, let’s just agree to disagree on that one. If you are saying that it doesn’t matter if the file is read in an inconsistent state; that’s a deeper thought experiment. In any event, I’m happy that you got this running. > On Jun 5, 2020, at 9:32 AM, 'Peter Fletcher' via weewx-user > <[email protected]> wrote: > > > > >> On Friday, June 5, 2020 at 12:09:47 PM UTC-4, John Kline wrote: >> You just have to be careful how you write the file (the external process). >> You want something along the lines of writing to a temp file, syncing to >> flush buffers and then moving that file to the filename that will be read by >> weewx. >> > I do not see why this is necessary, or (if you are trying to avoid weewx > reading a partially written file) why your approach is necessarily better > than my much simpler one. In the writing script, I am using Python's 'with > open(....' syntax, so the (very small) file is opened, written to, and then > immediately flushed and closed. I am not sure that it is even possible for > the file to be in a state that would cause a problem when the weewx service > tries to read it. > -- > 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/b6aef2bf-f95a-4b17-9677-807bb9a53fbeo%40googlegroups.com. -- 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/B77DC0CE-B482-443C-81A8-C59E1820E304%40johnkline.com.
