mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
migrate: fix checkLock
This commit is contained in:
1 file changed
+2
-2
@@ -8,10 +8,10 @@ import {
|
|||||||
const RE_MD5 = /^[\da-f]{32}$/;
|
const RE_MD5 = /^[\da-f]{32}$/;
|
||||||
|
|
||||||
function checkLock(innerCall) {
|
function checkLock(innerCall) {
|
||||||
return async (args) => {
|
return async (...args) => {
|
||||||
const cur = await SystemModel.get('migrate.lock');
|
const cur = await SystemModel.get('migrate.lock');
|
||||||
if (cur) throw new SystemError(`migrate lock already exists: ${cur}, possible another migration is running`);
|
if (cur) throw new SystemError(`migrate lock already exists: ${cur}, possible another migration is running`);
|
||||||
return innerCall(args);
|
return innerCall(...args);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user