From f6828c43946c984b371b492572178c70d0db4691 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Fri, 9 Mar 2018 15:51:26 +0100 Subject: [PATCH] Added description of generator object --- examples/feed-generator-from-redis/generator.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/feed-generator-from-redis/generator.py b/examples/feed-generator-from-redis/generator.py index ced808d..6683109 100755 --- a/examples/feed-generator-from-redis/generator.py +++ b/examples/feed-generator-from-redis/generator.py @@ -42,8 +42,17 @@ def gen_uuid(): class FeedGenerator: + def __init__(self, auto_flush=60*5): + """This object can be use to easily create a daily MISP-feed. - def __init__(self): + It handles the event creation, manifest file and cache file (hashes.csv). + + Attributes: + auto_flush (int) : (In seconds) If a positive value for auto_flush + is provided the FeedGenerator will the current event when + possible if the last flushed time is greater than auto_flush. + + """ self.sys_templates = get_system_templates() self.manifest = {}