Commit ea62a27a authored by Diego Molteni's avatar Diego Molteni
Browse files

added check if unlock

parent 64703dc9
Pipeline #34622 passed with stages
in 13 minutes and 34 seconds
......@@ -607,12 +607,14 @@ export class DatasetHandler {
const datasetOUTLockKey = datasetOUT.tenant + '/' + datasetOUT.subproject
+ datasetOUT.path + datasetOUT.name;
const datasetOUTLockRes = await Locker.getLock(datasetOUTLockKey);
if(Locker.isWriteLock(datasetOUTLockRes)) {
datasetOUT.sbit = datasetOUTLockRes as string;
datasetOUT.sbit_count = 1;
} else {
datasetOUT.sbit = (datasetOUTLockRes as string[]).join(':');
datasetOUT.sbit_count = datasetOUTLockRes.length;
if(datasetOUTLockRes) {
if(Locker.isWriteLock(datasetOUTLockRes)) {
datasetOUT.sbit = datasetOUTLockRes as string;
datasetOUT.sbit_count = 1;
} else {
datasetOUT.sbit = (datasetOUTLockRes as string[]).join(':');
datasetOUT.sbit_count = datasetOUTLockRes.length;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment