forked from rDrama/rDrama
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.
|
# value from /meta (or just guessing) and doing a random selection of keywords.
|
||||||
|
|
||||||
def offsite_mentions_task(cache:Cache):
|
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)
|
site_mentions = get_mentions(cache, const.REDDIT_NOTIFS_SITE)
|
||||||
|
print(site_mentions, flush=True)
|
||||||
notify_mentions(site_mentions)
|
notify_mentions(site_mentions)
|
||||||
|
|
||||||
if const.REDDIT_NOTIFS_USERS:
|
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
|
g.db.commit() # commit early otherwise localhost testing fails to commit
|
||||||
|
|
||||||
def get_mentions(cache:Cache, queries:Iterable[str], reddit_notifs_users=False):
|
def get_mentions(cache:Cache, queries:Iterable[str], reddit_notifs_users=False):
|
||||||
print('nword', flush=True)
|
print('get_mentions', flush=True)
|
||||||
kinds = ['submission', 'comment']
|
kinds = ['submission', 'comment']
|
||||||
mentions = []
|
mentions = []
|
||||||
exclude_subreddits = ['PokemonGoRaids', 'SubSimulatorGPT2', 'SubSimGPT2Interactive']
|
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'):
|
def notify_mentions(mentions, send_to=None, mention_str='site mention'):
|
||||||
print('notify_mentions', flush=True)
|
print('notify_mentions', flush=True)
|
||||||
|
print(mentions, flush=True)
|
||||||
for m in mentions:
|
for m in mentions:
|
||||||
print(m, flush=True)
|
print(m, flush=True)
|
||||||
author = m['author']
|
author = m['author']
|
||||||
|
|
Loading…
Reference in New Issue