Skip to content

Commit b8a792a

Browse files
committed
findUnique -> findFirst
1 parent 51a054f commit b8a792a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/webapp/app/v3/marqs/sharedQueueConsumer.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ export class SharedQueueConsumer {
10001000

10011001
class SharedQueueTasks {
10021002
async getCompletionPayloadFromAttempt(id: string): Promise<TaskRunExecutionResult | undefined> {
1003-
const attempt = await prisma.taskRunAttempt.findUnique({
1003+
const attempt = await prisma.taskRunAttempt.findFirst({
10041004
where: {
10051005
id,
10061006
status: {
@@ -1063,7 +1063,7 @@ class SharedQueueTasks {
10631063
isRetrying?: boolean;
10641064
skipStatusChecks?: boolean;
10651065
}): Promise<ProdTaskRunExecutionPayload | undefined> {
1066-
const attempt = await prisma.taskRunAttempt.findUnique({
1066+
const attempt = await prisma.taskRunAttempt.findFirst({
10671067
where: {
10681068
id,
10691069
},

apps/webapp/app/v3/services/resumeAttempt.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class ResumeAttemptService extends BaseService {
2222
this._logger.debug(`ResumeAttemptService.call()`, params);
2323

2424
await $transaction(this._prisma, async (tx) => {
25-
const attempt = await tx.taskRunAttempt.findUnique({
25+
const attempt = await tx.taskRunAttempt.findFirst({
2626
where: {
2727
friendlyId: params.attemptFriendlyId,
2828
},
@@ -169,7 +169,7 @@ export class ResumeAttemptService extends BaseService {
169169
const executions: TaskRunExecution[] = [];
170170

171171
for (const completedAttemptId of completedAttemptIds) {
172-
const completedAttempt = await tx.taskRunAttempt.findUnique({
172+
const completedAttempt = await tx.taskRunAttempt.findFirst({
173173
where: {
174174
id: completedAttemptId,
175175
taskRun: {

0 commit comments

Comments
 (0)