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

OAuth: re-sync RemoteRepository on login #9409

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

humitos
Copy link
Member

@humitos humitos commented Jul 7, 2022

Copy the logic from readthedocs-corporate to resync RemoteRepository each
time the user logs in. We are forcing users to re-login every 30 days minimum.

Related: #9402

Copy the logic from `readthedocs-corporate` to resync `RemoteRepository` each
time the user logs in. We are forcing users to re-login every 30 days minimum.

Related: #9402
@humitos humitos requested a review from a team as a code owner July 7, 2022 10:28
@humitos humitos requested a review from stsewd July 7, 2022 10:28
humitos added a commit that referenced this pull request Jul 7, 2022
Trigger a daily task to compare user's last login isoweekday with today's
isoweekday for all active users. If they matches, we resync the
`RemoteRepository` for this user.

This logic is the same as "resync `RemoteRepository` once a week per each user".

We consider active users those that have logged in at least once in the last 90
days.

Related: #8229
Related: #9409
humitos added a commit that referenced this pull request Jul 7, 2022
Trigger a daily task to compare user's last login isoweekday with today's
isoweekday for all active users. If they matches, we resync the
`RemoteRepository` for this user.

This logic is the same as "resync `RemoteRepository` once a week per each user".

We consider active users those that have logged in at least once in the last 90
days.

Related: #8229
Related: #9409
@humitos humitos merged commit a6e900b into main Jul 11, 2022
@humitos humitos deleted the humitos/resync-remoterepository-login branch July 11, 2022 10:52
humitos added a commit that referenced this pull request Jul 11, 2022
* OAuth: resync `RemoteRepository` weekly for active users

Trigger a daily task to compare user's last login isoweekday with today's
isoweekday for all active users. If they matches, we resync the
`RemoteRepository` for this user.

This logic is the same as "resync `RemoteRepository` once a week per each user".

We consider active users those that have logged in at least once in the last 90
days.

Related: #8229
Related: #9409

* Crontab schedule

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>

* OAuth: re-sync `RemoteRepository` in 1 Celery process only

Weekly resync will use only one Celery process to avoid backing up our queue.

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants