You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/polish_open_source_rank/contexts/community/infrastructure/sqlite/sqlite_discord_sync_job_repository.rb
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,20 @@ def pending(limit: 10)
57
57
SQL
58
58
end
59
59
60
+
defpending_for(platform,source_id)
61
+
database.fetch_all(<<~SQL,[platform,source_id])
62
+
SELECT #{pending_columns_sql}
63
+
FROM discord_sync_jobs
64
+
JOIN users
65
+
ON users.platform = discord_sync_jobs.platform
66
+
AND users.github_id = discord_sync_jobs.user_github_id
67
+
WHERE discord_sync_jobs.platform = ?
68
+
AND discord_sync_jobs.user_github_id = ?
69
+
AND discord_sync_jobs.status IN ('pending', 'retryable')
Copy file name to clipboardExpand all lines: spec/polish_open_source_rank/contexts/community/infrastructure/sqlite/sqlite_discord_sync_job_repository_spec.rb
0 commit comments