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