Skip to content

Commit 2573d1e

Browse files
committed
clearcache when updating mq
1 parent 2972493 commit 2573d1e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

OpenFlow/src/DatabaseConnection.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,10 @@ export class DatabaseConnection extends events.EventEmitter {
15921592
q.item = await this.Cleanmembers(q.item as any, original);
15931593
DBHelper.cached_roles = [];
15941594
}
1595-
if (q.item._type === "role") {
1595+
if (q.item._type === "role" && q.collectionname === "users") {
1596+
amqpwrapper.Instance().send("openflow", "", { "command": "clearcache" }, 20000, null, "", 1);
1597+
}
1598+
if (q.collectionname === "mq") {
15961599
amqpwrapper.Instance().send("openflow", "", { "command": "clearcache" }, 20000, null, "", 1);
15971600
}
15981601
if (q.collectionname != "fs.files") {
@@ -1995,6 +1998,9 @@ export class DatabaseConnection extends events.EventEmitter {
19951998
if (collectionname == "users" && doc._type == "role") {
19961999
amqpwrapper.Instance().send("openflow", "", { "command": "clearcache" }, 20000, null, "", 1);
19972000
}
2001+
if (collectionname === "mq") {
2002+
amqpwrapper.Instance().send("openflow", "", { "command": "clearcache" }, 20000, null, "", 1);
2003+
}
19982004
}
19992005
} catch (error) {
20002006
span.recordException(error);

0 commit comments

Comments
 (0)