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

Chore/lock repos when repairing #1149

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

alexanderleegs
Copy link
Contributor

This PR locks the repo during the time site repair is being done, to prevent editing by users during this period.

@alexanderleegs alexanderleegs requested a review from a team February 20, 2024 05:36
@@ -35,10 +35,10 @@ const mockUnlock = (siteName) => {
mockMutexObj[siteName] = false
}

const lock = async (siteName) => {
const lock = async (siteName, lockLengthSeconds = 60) => {
try {
const ONE_MIN_FROM_CURR_DATE_IN_SECONDS_FROM_EPOCH_TIME =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the "one min" isn't true anymore, might want to rename the variable to avoid confusion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0cc6344!

@alexanderleegs alexanderleegs merged commit e911e2e into develop Feb 22, 2024
11 checks passed
@mergify mergify bot deleted the chore/lock-repos-when-repairing branch February 22, 2024 06:53
@alexanderleegs alexanderleegs mentioned this pull request Feb 22, 2024
6 tasks
alexanderleegs added a commit that referenced this pull request Feb 22, 2024
@alexanderleegs alexanderleegs mentioned this pull request Feb 22, 2024
alexanderleegs added a commit that referenced this pull request Feb 29, 2024
alexanderleegs added a commit that referenced this pull request Mar 7, 2024
alexanderleegs added a commit that referenced this pull request Mar 7, 2024
* Revert "Revert "Chore/lock repos when repairing (#1149)""

This reverts commit a746288.

* fix: return 200 to forms and adjust lock time

* chore: revert to 15 minutes

Tested with repos - they are able to lock/unlock independently so no need for scaling lock time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants