File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
apps/webapp/app/v3/models Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,10 @@ type WorkerDeploymentWithWorkerTasks = Prisma.WorkerDeploymentGetPayload<{
21
21
export async function findCurrentWorkerDeployment (
22
22
environmentId : string
23
23
) : Promise < WorkerDeploymentWithWorkerTasks | undefined > {
24
- const promotion = await prisma . workerDeploymentPromotion . findUnique ( {
24
+ const promotion = await prisma . workerDeploymentPromotion . findFirst ( {
25
25
where : {
26
- environmentId_label : {
27
- environmentId,
28
- label : CURRENT_DEPLOYMENT_LABEL ,
29
- } ,
26
+ environmentId,
27
+ label : CURRENT_DEPLOYMENT_LABEL ,
30
28
} ,
31
29
include : {
32
30
deployment : {
@@ -66,7 +64,7 @@ export async function findCurrentWorkerFromEnvironment(
66
64
export async function getWorkerDeploymentFromWorker (
67
65
workerId : string
68
66
) : Promise < WorkerDeploymentWithWorkerTasks | undefined > {
69
- const worker = await prisma . backgroundWorker . findUnique ( {
67
+ const worker = await prisma . backgroundWorker . findFirst ( {
70
68
where : {
71
69
id : workerId ,
72
70
} ,
@@ -91,7 +89,7 @@ export async function getWorkerDeploymentFromWorker(
91
89
export async function getWorkerDeploymentFromWorkerTask (
92
90
workerTaskId : string
93
91
) : Promise < WorkerDeploymentWithWorkerTasks | undefined > {
94
- const workerTask = await prisma . backgroundWorkerTask . findUnique ( {
92
+ const workerTask = await prisma . backgroundWorkerTask . findFirst ( {
95
93
where : {
96
94
id : workerTaskId ,
97
95
} ,
You can’t perform that action at this time.
0 commit comments