1
0
Fork 0
mirror of synced 2024-09-28 23:31:43 +12:00

Adding another check to make sure context is the same.

This commit is contained in:
mike12345567 2022-04-20 23:13:08 +01:00
parent 1d61ff906a
commit 9d01028bd0

View file

@ -90,7 +90,7 @@ exports.doInTenant = (tenantId, task) => {
}
}
const using = cls.getFromContext(ContextKeys.IN_USE)
if (using) {
if (using && cls.getFromContext(ContextKeys.TENANT_ID) === tenantId) {
cls.setOnContext(ContextKeys.IN_USE, using + 1)
return internal({ existing: true })
} else {
@ -154,7 +154,7 @@ exports.doInAppContext = (appId, task) => {
}
}
const using = cls.getFromContext(ContextKeys.IN_USE)
if (using) {
if (using && cls.getFromContext(ContextKeys.APP_ID) === appId) {
cls.setOnContext(ContextKeys.IN_USE, using + 1)
return internal({ existing: true })
} else {