Add command to run the monboob process only once
This commit is contained in:
parent
a84fde80e6
commit
64d976d6d9
1 changed files with 8 additions and 0 deletions
|
|
@ -253,6 +253,14 @@ class Monboob(ReplApplication):
|
||||||
self.weboob.repeat(self.config.get('interval'), self.process)
|
self.weboob.repeat(self.config.get('interval'), self.process)
|
||||||
self.weboob.loop()
|
self.weboob.loop()
|
||||||
|
|
||||||
|
def do_once(self, line):
|
||||||
|
"""
|
||||||
|
once
|
||||||
|
|
||||||
|
Send mails only once, then exit.
|
||||||
|
"""
|
||||||
|
return self.process()
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
try:
|
try:
|
||||||
for backend, message in self.weboob.do('iter_unread_messages'):
|
for backend, message in self.weboob.do('iter_unread_messages'):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue