|
|
|
@ -43,10 +43,9 @@ def post_webhook(msg):
|
|
|
|
|
|
|
|
|
|
def get_latest_tipped_posts():
|
|
|
|
|
key_name = 'latest_tips'
|
|
|
|
|
tipped_posts = rw_cache(key_name, None, 1200)
|
|
|
|
|
|
|
|
|
|
posts = []
|
|
|
|
|
tipped_posts = rw_cache(key_name)
|
|
|
|
|
if not tipped_posts:
|
|
|
|
|
new_data = []
|
|
|
|
|
w = Wallet()
|
|
|
|
|
data = {}
|
|
|
|
|
for acc in w.accounts():
|
|
|
|
@ -61,10 +60,10 @@ def get_latest_tipped_posts():
|
|
|
|
|
|
|
|
|
|
dates = sorted(data, reverse=True)
|
|
|
|
|
for d in dates:
|
|
|
|
|
if not data[d] in new_data:
|
|
|
|
|
new_data.append(data[d])
|
|
|
|
|
if not data[d] in posts:
|
|
|
|
|
posts.append(data[d])
|
|
|
|
|
|
|
|
|
|
tipped_posts = rw_cache(key_name, new_data, 1200)
|
|
|
|
|
tipped_posts = rw_cache(key_name, posts)
|
|
|
|
|
|
|
|
|
|
return tipped_posts
|
|
|
|
|
|
|
|
|
|