Ejemplo n.º 1
0
 def get_data(self):
     key = current_app.config['FAV_ARTICLE_LIST_UPDATE_CACHE_KEY']
     update = cache[key]
     if update:
         return fill_change_date_object(update)
     else:
         now_timestamp = calendar.timegm(datetime.datetime.utcnow().utctimetuple())
         return fill_change_date_object(now_timestamp)
Ejemplo n.º 2
0
 def get_data(self):
     if self.is_daily_read_timeline:
         key = current_app.config['FAV_TIMELINE_UPDATE_CACHE_KEY']
     else:
         key = current_app.config['MAIN_TIMELINE_UPDATE_CACHE_KEY']
     update = cache[key]
     if update:
         return fill_change_date_object(update)
     else:
         now_timestamp = calendar.timegm(datetime.datetime.utcnow().utctimetuple())
         return fill_change_date_object(now_timestamp)