more print debugging
parent
569f0269e3
commit
4594a6ecb8
|
@ -21,8 +21,9 @@ from files.classes.notifications import Notification
|
|||
# value from /meta (or just guessing) and doing a random selection of keywords.
|
||||
|
||||
def offsite_mentions_task(cache:Cache):
|
||||
print('hola', flush=True)
|
||||
print('offsite_mentions_task', flush=True)
|
||||
site_mentions = get_mentions(cache, const.REDDIT_NOTIFS_SITE)
|
||||
print(site_mentions, flush=True)
|
||||
notify_mentions(site_mentions)
|
||||
|
||||
if const.REDDIT_NOTIFS_USERS:
|
||||
|
@ -33,7 +34,7 @@ def offsite_mentions_task(cache:Cache):
|
|||
g.db.commit() # commit early otherwise localhost testing fails to commit
|
||||
|
||||
def get_mentions(cache:Cache, queries:Iterable[str], reddit_notifs_users=False):
|
||||
print('nword', flush=True)
|
||||
print('get_mentions', flush=True)
|
||||
kinds = ['submission', 'comment']
|
||||
mentions = []
|
||||
exclude_subreddits = ['PokemonGoRaids', 'SubSimulatorGPT2', 'SubSimGPT2Interactive']
|
||||
|
@ -88,6 +89,7 @@ def get_mentions(cache:Cache, queries:Iterable[str], reddit_notifs_users=False):
|
|||
|
||||
def notify_mentions(mentions, send_to=None, mention_str='site mention'):
|
||||
print('notify_mentions', flush=True)
|
||||
print(mentions, flush=True)
|
||||
for m in mentions:
|
||||
print(m, flush=True)
|
||||
author = m['author']
|
||||
|
|
Loading…
Reference in New Issue