Thanks for the quick reply, Tom.  This makes sense.  I had the 45 seconds in there from some debugging 6-8 months ago and I really don't need it anymore.  Just removed it.

- Paul VE1DX

On 2021-02-27 12:09 p.m., Tom Keffer wrote:
Unfortunately, wee_reports has to load extensions.py, because there might be some user extensions in there, which it might need for the reports (for example, an xtypes extension). So, whatever is in there, is going to get executed.

I no longer think an arbitrary 45 second sleep is such a good idea. The engine already has something that causes it to wait until the time is greater than the timestamp on weewx.conf, so that should give some measure of protection against clock slew. But, the best way to approach the problem is through systemd time synchronizations.

If you really want to sleep, then it's probably best done with a WeeWX extension that's bound to the STARTUP event.



On Sat, Feb 27, 2021 at 7:56 AM WindnFog <[email protected] <mailto:[email protected]>> wrote:

    Here's an oddity.  To delay weewx from starting for 45 seconds
    after a reboot, I used Tom's 2019 suggestion of putting a delay of
    45 in /usr/share/weewx/user/extensions.py . . . and this works
    well, except it also kicks in when you run wee_reports:

    *sudo wee_reports
    ^CTraceback (most recent call last):
      File "/usr/share/weewx/wee_reports", line 16, in <module>
        import user.extensions
      File "/usr/share/weewx/user/extensions.py", line 20, in <module>
        time.sleep(45)
    KeyboardInterrupt*   <--- I ctrl-C'ed out of this after 25-30 seconds.

    Is there any way to change the code so that wee_reports doesn't
    execute the time.sleep(45) command?

    - Paul VE1DX
-- 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]
    <mailto:[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/weewx-user/1c121d0d-e909-425e-b532-7d79fc2d9954n%40googlegroups.com
    
<https://groups.google.com/d/msgid/weewx-user/1c121d0d-e909-425e-b532-7d79fc2d9954n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/kMMYGq5gC6E/unsubscribe <https://groups.google.com/d/topic/weewx-user/kMMYGq5gC6E/unsubscribe>. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEDqK-0aNM6SjaHYgx9eiAR465rTUotYYe6pJ-05-%3De0zQ%40mail.gmail.com <https://groups.google.com/d/msgid/weewx-user/CAPq0zEDqK-0aNM6SjaHYgx9eiAR465rTUotYYe6pJ-05-%3De0zQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
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/b9d0931c-5878-7ddf-8698-6c66e7ef61ae%40gmail.com.

Reply via email to