Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add 'approval_prompt': 'force' to decorator, in order to get a refres…

…h token
  • Loading branch information...
commit 0a8d2b5cce38dde487fddd6c609abe576f0cc977 1 parent f78a194
@ronjouch authored
Showing with 4 additions and 1 deletion.
  1. +1 −1  dailygrooves/cron.yaml
  2. +3 −0  dailygrooves/dailygrooves.py
View
2  dailygrooves/cron.yaml
@@ -1,5 +1,5 @@
cron:
- description: daily fetch
url: /cronfetch
- schedule: every day 08:25
+ schedule: every day 18:06
timezone: US/Eastern
View
3  dailygrooves/dailygrooves.py
@@ -52,6 +52,9 @@ class FetchHandler(RequestHandler):
@DECORATOR.oauth_required
def get(self):
+ # approval_prompt=force required to force getting a refresh_token
+ # that will be used in cron in offline mode
+ DECORATOR.flow.params.update({'approval_prompt': 'force'})
user_id = users.get_current_user().user_id()
gae_user = GaeUser(id=user_id, date=datetime.now())
gae_user.put()
Please sign in to comment.
Something went wrong with that request. Please try again.