To enable the use of a minutely repeat interval in the snap schedules,
this adds a guard that checks for the SNAP_SCHED_TEST env variable.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
from datetime import datetime, timezone
import json
import logging
+from os import environ
import re
import sqlite3
from typing import Tuple, Any
def repeat(self):
mult = self.schedule[-1]
period = int(self.schedule[0:-1])
- if mult == 'M':
+ if 'SNAP_SCHED_TESTING' in environ and mult == 'M':
return period * 60
elif mult == 'h':
return period * 60 * 60