@cronjobs.register
def update_google_analytics(date=None):
 if date:
  date = datetime.datetime.strptime(date, '%Y-%m-%d').date()
 else:
  date = (datetime.date.today() - datetime.timedelta(days=1))
 tasks.update_google_analytics.delay(date=date)

@ cronjobs . register def update_google_analytics ( date = None ) : if date : date = datetime . datetime . strptime ( date , '%Y-%m-%d' ) . date ( ) else : date = ( datetime . date . today ( ) - datetime . timedelta ( days = 1 ) ) tasks . update_google_analytics . delay ( date = date )
update stats from google analytics .