Skip to content

Commit fb9c232

Browse files
Update cdk/src/handlers/get-task.ts
Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
1 parent 98c86a3 commit fb9c232

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cdk/src/handlers/get-task.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ async function computeQueueInfo(
7676
for (const item of resp.Items ?? []) {
7777
if (item.task_id === record.task_id) {
7878
found = true;
79-
} else if (typeof item.created_at === 'string' && item.created_at < record.created_at) {
79+
} else if (
80+
typeof item.created_at === 'string'
81+
&& (item.created_at < record.created_at
82+
|| (item.created_at === record.created_at
83+
&& typeof item.task_id === 'string'
84+
&& item.task_id < record.task_id))
85+
) {
8086
ahead++;
8187
}
8288
}

0 commit comments

Comments
 (0)