remove some notifs

dev
Thomas Lynch 2 years ago
parent c5ab88e948
commit 3780993fd8
  1. 2
      components/notifiers.py
  2. 6
      components/watchers.py

@ -10,7 +10,7 @@ class Notifier(ABC):
class TermuxNotifier(Notifier):
def notify(self, title, content, *args, **kwargs):
subprocess.call(['termux-notification', '--title', title, '--content', content])
subprocess.call(['termux-notification', '--title', title, '--content', content or 'No Message'])
class NotifySendNotifier(Notifier):

@ -35,12 +35,12 @@ class RecentWatcher(Watcher):
def connect():
logging.debug(f'Live posts client connected')
client.emit('room', f'{board}-manage-recent-hashed' if board else 'globalmanage-recent-hashed')
notify(f'Connected', f'Watching live posts')
#notify(f'Connected', f'Watching live posts')
@client.event
def disconnect():
logging.error(f'Live posts client disconnected')
notify(f'Lost live posts connection', f'Retrying in {reconnection_delay} seconds')
#notify(f'Lost live posts connection', f'Retrying in {reconnection_delay} seconds')
@client.on('newPost')
def on_new_post(post):
@ -88,7 +88,7 @@ class ReportsWatcher(Watcher):
except RequestException as e:
logging.error(f'Exception {e} occurred while fetching reports')
self.notify(f'Error while fetching reports', f'Trying to reconnect')
#self.notify(f'Error while fetching reports', f'Trying to reconnect')
if self._stp.wait(self.fetch_interval):
logging.info("Exiting reports watcher")

Loading…
Cancel
Save