Skip to content

Commit 3645f38

Browse files
authored
completed definition (#168)
1 parent cf7ceb5 commit 3645f38

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

packages/sync-engine/src/database/postgres.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,7 @@ export class PostgresClient {
761761
}
762762

763763
/**
764-
* Find a run that completed successfully (closed with no object errors)
765-
* within the given time window.
764+
* Find a run that completed (closed) within the given time window.
766765
*
767766
* @param intervalSeconds - How far back to look, in seconds.
768767
*/
@@ -776,12 +775,6 @@ export class PostgresClient {
776775
WHERE r."_account_id" = $1
777776
AND r.closed_at IS NOT NULL
778777
AND r.closed_at >= now() - make_interval(secs => $2)
779-
AND NOT EXISTS (
780-
SELECT 1 FROM "${this.syncSchema}"."_sync_obj_runs" o
781-
WHERE o."_account_id" = r."_account_id"
782-
AND o.run_started_at = r.started_at
783-
AND o.status = 'error'
784-
)
785778
LIMIT 1`,
786779
[accountId, intervalSeconds]
787780
)

0 commit comments

Comments
 (0)