Skip to content

Commit 4b92b34

Browse files
committed
perf(webapp): select only needed columns in dev current-worker lookup
The development-environment branch of findCurrentWorkerFromEnvironment loaded every BackgroundWorker column, including the large metadata JSON, but the function only returns a handful of small fields. Add a select matching the return type so the unused columns never leave the database.
1 parent 8dc8e1b commit 4b92b34

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)