Ankündigung

Einklappen
Keine Ankündigung bisher.

Fehler in linknx-Log : [ WARN] TimerManager: TimerTask skipped ...

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #16
    Hi,

    I just accepted Tru's PR and added another fix for time specs with a constraint on the year. I finally decided not to try to fix the other bug as that would imply a change in behavior that could break someone's config. Let's take an example: if current date is February 29, 2016 06:00 (2016 was a leap year), the next execution of the task with a time spec requiring "month: February, day: 29, hour: 6, min: 0" is going to be March 01, 2017 06:00. It could have been February 29, 2020 06:00 (next leap year after 2016) but this case is simply not handled in the code, leading to the current non-specified behavior.
    I spent hours this weekend trying to improve the code but I finally gave up since I could not come up with a clean solution that does not change the behavior.

    For those willing to get the fix, please download the version from the master branch for now: https://github.com/linknx/linknx/archive/master.zip

    Best regards,
    Cyrille

    Kommentar


      #17
      Hi Everyone,

      After the initial fix pushed in October, I wanted to sanitize the code handling time specs in order to make it simpler in two ways:
      - the code itself was filled with hacks making it very hard to understand on edge cases
      - the specification was unclear for some cases, such as leap days

      That was tough but with the help from Tru (who I warmly thank again here for his kind and valuable help along the way) we finally agreed on a new approach that is ready for testing in the periodictask_rework2 branch on github. All unit tests now pass. I also added a few ones to make it even safer. But the test cases do not cover 100% of the use cases, so I think it is safer to ask people here for a test round with their own configuration.

      If you are willing to participate:
      - download a zip of the source code here: https://github.com/linknx/linknx/archive/periodictask_rework2.zip Do not download the master branch as mainstream has not been updated with those pending changes yet.
      - backup your current linknx executable to allow for an easy rollback in case of trouble
      - run ./bootstrap.sh to create the build system ("configure" and such)
      - run ./configure with your usual options
      - make install
      - run linknx for a few days and make sure everything behaves as expected

      I think the things that are most likely to be buggy are:
      - timer conditions of type "variable", "sunset", "sunrise", or "noon"
      - timer conditions with an offset
      - communication via the XML TCP interface

      If you want, your review of the ongoing Pull Request would be much appreciated: https://github.com/linknx/linknx/pull/39

      Last, let me mention that this new version changes the behavior on a few edge cases:
      - next occurrence of February 29 after 29/02/2016 is now 29/02/2020. Before, 01/03/2017 was selected (since 2017 is not a leap year, 29/02 was automatically translated to 01/03). To me, the new behavior is more intuitive.
      - time specs with "non natural" dates such as 31/04 now cause an error to be thrown when reading the XML config. Before, such a constraint was silently translated to 01/05. Again, the new behavior looks more consistent.

      Should any of these changes be a problem for you, please drop me a line so that we can discuss your issue.

      Thank you all in advance for your kind help. Unless something wrong is detected, I am planning to merge the changes with master in a few weeks, so take your chance to be sure everything will be okay for you once it is done

      Best regards,
      Cyrille

      Kommentar


        #18
        Hi,

        I just completed the pull request and published the new release 0.0.1.37.

        Cyrille

        Kommentar

        Lädt...
        X