Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GITC-434: handle invalid user access tokens #9507

Merged
merged 3 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/marketing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ def settings_helper_get_auth(request, key=None):
# check if user's email has changed
if request.user.is_authenticated and request.user.profile:
current_email = get_github_primary_email(request.user.profile.github_access_token)
if not current_email:
request.user.profile.github_access_token = ''
request.user.profile.save()
if current_email != request.user.profile.email:
request.user.profile.email = current_email
request.user.profile.save()
Expand Down
4 changes: 2 additions & 2 deletions scripts/crontab2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

## SLIM CLR (every 2 hours)
0 */2 * * * cd gitcoin/coin; bash scripts/run_clr.bash slim 2>&1
## SLIM CLR (every 3 hours)
0 */3 * * * cd gitcoin/coin; bash scripts/run_clr.bash slim 2>&1
4 changes: 2 additions & 2 deletions scripts/crontab4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

## FULL CLR (every 15 minutes)
*/15 * * * * cd gitcoin/coin; bash scripts/run_clr.bash full 2>&1
## FULL CLR (every 6 hours)
0 */6 * * * cd gitcoin/coin; bash scripts/run_clr.bash full 2>&1