comment code

This commit is contained in:
Adisak 2026-06-12 11:31:33 +07:00
parent 1b1a234bfb
commit 7c1a838600
2 changed files with 84 additions and 83 deletions

View file

@ -492,14 +492,14 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise<boolean>
let profilesSend =
command && command.commandSends.length > 0
? command.commandSends
.filter((x: any) => x.profileId != null)
.map((x: any) => ({
receiverUserId: x.profileId,
notiLink: "",
isSendMail: x.commandSendCCs.map((x: any) => x.name == "EMAIL").length > 0,
isSendInbox: x.commandSendCCs.map((x: any) => x.name == "INBOX").length > 0,
isSendNotification: true,
}))
.filter((x: any) => x.profileId != null)
.map((x: any) => ({
receiverUserId: x.profileId,
notiLink: "",
isSendMail: x.commandSendCCs.map((x: any) => x.name == "EMAIL").length > 0,
isSendInbox: x.commandSendCCs.map((x: any) => x.name == "INBOX").length > 0,
isSendNotification: true,
}))
: [];
const payloadStr = await PayloadSendNoti(command.id);
const profilesSendRequest = new CallAPI()
@ -1719,23 +1719,23 @@ async function clearMenuAndRoleCache(): Promise<void> {
console.log(`[AMQ] Cleared ${roleKeys.length} role cache keys`);
}
const posMasterKeys = await keysAsync("posMaster_*");
if (posMasterKeys.length > 0) {
await delAsync(...posMasterKeys);
console.log(`[AMQ] Cleared ${posMasterKeys.length} posMaster cache keys`);
}
// const posMasterKeys = await keysAsync("posMaster_*");
// if (posMasterKeys.length > 0) {
// await delAsync(...posMasterKeys);
// console.log(`[AMQ] Cleared ${posMasterKeys.length} posMaster cache keys`);
// }
const userKeys = await keysAsync("user_*");
if (userKeys.length > 0) {
await delAsync(...userKeys);
console.log(`[AMQ] Cleared ${userKeys.length} user cache keys`);
}
// const userKeys = await keysAsync("user_*");
// if (userKeys.length > 0) {
// await delAsync(...userKeys);
// console.log(`[AMQ] Cleared ${userKeys.length} user cache keys`);
// }
const orgKeys = await keysAsync("org_*");
if (orgKeys.length > 0) {
await delAsync(...orgKeys);
console.log(`[AMQ] Cleared ${orgKeys.length} org cache keys`);
}
// const orgKeys = await keysAsync("org_*");
// if (orgKeys.length > 0) {
// await delAsync(...orgKeys);
// console.log(`[AMQ] Cleared ${orgKeys.length} org cache keys`);
// }
} finally {
redisClient.quit();
}