We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7118bcc commit 17d82daCopy full SHA for 17d82da
lib/mongo/models/plugins.ts
@@ -24,5 +24,12 @@ const pluginMongooseSchema = new Schema({
24
25
pluginMongooseSchema.index({ toolId: 1 }, { unique: true, sparse: true });
26
pluginMongooseSchema.index({ type: 1 });
27
+pluginMongooseSchema.index(
28
+ { status: 1 },
29
+ {
30
+ expireAfterSeconds: 600, // 10 minutes = 600 seconds
31
+ partialFilterExpression: { status: { $ne: 'active' } }
32
+ }
33
+);
34
35
export const MongoPlugin = getMongoModel('fastgpt_plugins', pluginMongooseSchema);
0 commit comments