perf: hoist companies.list() outside stale-case loop
This commit is contained in:
@@ -723,8 +723,8 @@ const plugin = definePlugin({
|
|||||||
};
|
};
|
||||||
|
|
||||||
let reminded = 0;
|
let reminded = 0;
|
||||||
|
const companies = await ctx.companies.list();
|
||||||
for (const staleCase of data.cases) {
|
for (const staleCase of data.cases) {
|
||||||
const companies = await ctx.companies.list();
|
|
||||||
for (const company of companies) {
|
for (const company of companies) {
|
||||||
const issues = await ctx.issues.list({ companyId: company.id });
|
const issues = await ctx.issues.list({ companyId: company.id });
|
||||||
let linkedIssueId: string | null = null;
|
let linkedIssueId: string | null = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user