diff options
author | 2017-10-24 13:35:42 +0300 | |
---|---|---|
committer | 2017-10-24 13:35:42 +0300 | |
commit | 7cba26258ea17f790028a7005cb9bbbdc3923389 (patch) | |
tree | 603f9b7bd2fa6226f99fde9bfa1526f172fef154 /app/discover/manager.py | |
parent | e2240ef940939a6c0cc30ca6370aae0d42c5a4af (diff) |
several bug fixes for release 1.1
Change-Id: I433d41245107a68959efdcd6b56ce3348c7bbeb5
Signed-off-by: Koren Lev <korenlev@gmail.com>
Diffstat (limited to 'app/discover/manager.py')
-rw-r--r-- | app/discover/manager.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/discover/manager.py b/app/discover/manager.py index e37bb31..503c8a8 100644 --- a/app/discover/manager.py +++ b/app/discover/manager.py @@ -9,6 +9,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 # ############################################################################### from abc import ABC, abstractmethod +import datetime from utils.logging.file_logger import FileLogger from utils.logging.full_logger import FullLogger @@ -19,6 +20,14 @@ class Manager(ABC): MIN_INTERVAL = 0.1 # To prevent needlessly frequent scans + INTERVALS = { + 'YEARLY': datetime.timedelta(days=365.25), + 'MONTHLY': datetime.timedelta(days=365.25/12), + 'WEEKLY': datetime.timedelta(weeks=1), + 'DAILY': datetime.timedelta(days=1), + 'HOURLY': datetime.timedelta(hours=1) + } + def __init__(self, log_directory: str = None, mongo_config_file: str = None): super().__init__() |