Add a CLI command to unlock a project#247
Add a CLI command to unlock a project#2472ndkauboy wants to merge 3 commits intowearerequired:masterfrom
Conversation
|
Would
Do you perhaps know what happened in your case? Was there some kind of error perhaps? I am asking because the lock is supposed to be removed right away after updating: Lines 84 to 98 in a9faec1 So I am curious to get to the bottom of this. As an alternative, we could think about simply adding a timestamp as the meta value for the lock and then create some cron job to clean up stale locks. No manual intervention needed in this case :-) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #247 +/- ##
============================================
- Coverage 72.47% 71.57% -0.91%
Complexity 350 350
============================================
Files 29 29
Lines 1268 1284 +16
============================================
Hits 919 919
- Misses 349 365 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ocean90
left a comment
There was a problem hiding this comment.
I don't believe we need a dedicated CLI command for this. We're using Traduttore many years and never had this issue.
If you have to unlock a project you probably want to run an update right after it, correct? Why not remove an existing lock as part of the update command? Or should the update command also set a lock and you can pass --force to ignore/delete an existing lock?
|
I don't mind having a different solution to that. Just as of now, there is no straightforward way to unlock a project. This issue came up trying to unlock a project on a WordPress VIP hosting environment, where you don't have direct access to the database and also some WP-CLI commands are forbidden. |
|
It's possible for a lock to be acquired and never released, with no warnings, causing the project to hang indefinitely. I disabled the lock logic on my wp install. |
Description
In certain situations, a project can get locked. If this happens, there is currently no way to unlock it, except for removing the lock in the database directly.
How has this been tested?
In a custom plugin, this command has been registered as a new command in a different namespace, and it could be tested successfully as expected.
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: