Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
findUnique -> findFirst
  • Loading branch information
nicktrn committed Jan 10, 2025
commit b8a792a41f2a2306769f54a780dee497f4ad2244
4 changes: 2 additions & 2 deletions apps/webapp/app/v3/marqs/sharedQueueConsumer.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ export class SharedQueueConsumer {

class SharedQueueTasks {
async getCompletionPayloadFromAttempt(id: string): Promise<TaskRunExecutionResult | undefined> {
const attempt = await prisma.taskRunAttempt.findUnique({
const attempt = await prisma.taskRunAttempt.findFirst({
where: {
id,
status: {
Expand Down Expand Up @@ -1063,7 +1063,7 @@ class SharedQueueTasks {
isRetrying?: boolean;
skipStatusChecks?: boolean;
}): Promise<ProdTaskRunExecutionPayload | undefined> {
const attempt = await prisma.taskRunAttempt.findUnique({
const attempt = await prisma.taskRunAttempt.findFirst({
where: {
id,
},
Expand Down
4 changes: 2 additions & 2 deletions apps/webapp/app/v3/services/resumeAttempt.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ResumeAttemptService extends BaseService {
this._logger.debug(`ResumeAttemptService.call()`, params);

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

for (const completedAttemptId of completedAttemptIds) {
const completedAttempt = await tx.taskRunAttempt.findUnique({
const completedAttempt = await tx.taskRunAttempt.findFirst({
where: {
id: completedAttemptId,
taskRun: {
Expand Down