add 'sleep-extractor' option (closes #964)
(would have been nice if this were possible without code duplication)
This commit is contained in:
@@ -59,6 +59,9 @@ class Job():
|
||||
|
||||
def run(self):
|
||||
"""Execute or run the job"""
|
||||
sleep = self.extractor.config("sleep-extractor")
|
||||
if sleep:
|
||||
time.sleep(sleep)
|
||||
try:
|
||||
log = self.extractor.log
|
||||
for msg in self.extractor:
|
||||
@@ -586,6 +589,10 @@ class DataJob(Job):
|
||||
self.filter = (lambda x: x) if private else util.filter_dict
|
||||
|
||||
def run(self):
|
||||
sleep = self.extractor.config("sleep-extractor")
|
||||
if sleep:
|
||||
time.sleep(sleep)
|
||||
|
||||
# collect data
|
||||
try:
|
||||
for msg in self.extractor:
|
||||
|
||||
Reference in New Issue
Block a user