Skip to content

Commit b534c92

Browse files
committed
perf(webapp): select only needed columns in dev current-worker lookup
The DEVELOPMENT branch of findCurrentWorkerFromEnvironment fetched every BackgroundWorker column (including the large metadata JSON) but the function only returns 7 small fields. Add a select matching the declared return type so the discarded columns never leave the database. refs TRI-13298
1 parent 8dc8e1b commit b534c92

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

apps/webapp/app/v3/models/workerDeployment.server.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,15 @@ export async function findCurrentWorkerFromEnvironment(
209209
where: {
210210
runtimeEnvironmentId: environment.id,
211211
},
212+
select: {
213+
id: true,
214+
friendlyId: true,
215+
version: true,
216+
sdkVersion: true,
217+
cliVersion: true,
218+
supportsLazyAttempts: true,
219+
engine: true,
220+
},
212221
orderBy: {
213222
createdAt: "desc",
214223
},

0 commit comments

Comments
 (0)