feat: default values, general item excludes, images, queueManager to manage multi worker messaging to telegram to prevent too many connections
Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
32
datalayer/general_monitor.py
Normal file
32
datalayer/general_monitor.py
Normal file
@@ -0,0 +1,32 @@
|
||||
class GeneralMonitor:
|
||||
def __init__(self, title_exclude, description_exclude, title_must_include, description_must_include, title_first_word_exclude):
|
||||
self._title_exclude = title_exclude
|
||||
self._description_exclude = description_exclude
|
||||
self._title_must_include = title_must_include
|
||||
self._description_must_include = description_must_include
|
||||
self._title_first_word_exclude = title_first_word_exclude
|
||||
|
||||
@classmethod
|
||||
def load_from_json(cls, json_data):
|
||||
return cls(
|
||||
json_data.get('title_exclude', []),
|
||||
json_data.get('description_exclude', []),
|
||||
json_data.get('title_must_include', []),
|
||||
json_data.get('description_must_include', []),
|
||||
json_data.get('title_first_word_exclude', [])
|
||||
)
|
||||
|
||||
def get_title_exclude(self):
|
||||
return self._title_exclude
|
||||
|
||||
def get_description_exclude(self):
|
||||
return self._description_exclude
|
||||
|
||||
def get_title_must_include(self):
|
||||
return self._title_must_include
|
||||
|
||||
def get_description_must_include(self):
|
||||
return self._description_must_include
|
||||
|
||||
def get_title_first_word_exclude(self):
|
||||
return self._title_first_word_exclude
|
||||
Reference in New Issue
Block a user