From fbf7d10fd1ba26c8920426a3aa31e8db4bae74bb Mon Sep 17 00:00:00 2001 From: Stephan Geulette Date: Sat, 30 Nov 2024 10:26:12 +0100 Subject: [PATCH] Added cron settings info --- src/imio/updates/inst_infos.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/imio/updates/inst_infos.py b/src/imio/updates/inst_infos.py index 3da7879..f8a1672 100644 --- a/src/imio/updates/inst_infos.py +++ b/src/imio/updates/inst_infos.py @@ -12,6 +12,8 @@ from plone import api from Products.CMFPlone.utils import base_hasattr from Products.CPUtils.Extensions.utils import tobytes +from Products.cron4plone.browser.configlets.cron_configuration import ICronConfiguration +from zope.component import queryUtility import json import os @@ -129,6 +131,12 @@ def check_wsclient(): # get assigned_user option infos['checks']['assigned_user'] = api.portal.get_registry_record('imio.dms.mail.browser.settings.' 'IImioDmsMailConfig.assigned_user_check') + # get cron4plone settings + cron_configlet = queryUtility(ICronConfiguration, "cron4plone_config") + if not cron_configlet.cronjobs: + infos['checks']['cron'] = 0 + else: + infos['checks']['cron'] = 1 # get wsclient option infos['checks']['pm'] = check_wsclient() # get query next prev max result value