The way consistency check select documents to check at each run when running incremental mode, consistency seems to have issues which leads to documents not checked sometimes.
I noticed two reasons:
- When Zope runs with a timezone that is not
UTC, the date comparison to find new documents compares a date in zope local timezone with a timestamp in mysql timezone. First fix is to pass a date to catalog, so that catalog convert it to the catalog timezone (it's a mistake to pass a date as string when using catalog programmatically). Second fix seem that we seem to need to configure mariadb to useUTCby default. -
alarm.getLastActiveProcessdoes not return the latest active process when alarm is executingactiveSenseso we need to passinclude_active=Truein this case.