Skip to content

Commit

Permalink
fix: Debouncing job can fail on multiple results returned by key (#2104)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar authored Jan 25, 2024
1 parent 5de02da commit 5fedace
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ interface BatchJobRepository : JpaRepository<BatchJob, Long> {
from BatchJob j
where j.debouncingKey = :debouncingKey
and j.status = 'PENDING'
and j.id = (select max(j2.id) from BatchJob j2 where j2.debouncingKey = :debouncingKey and j2.status = 'PENDING')
""",
)
fun findBatchJobByDebouncingKey(debouncingKey: String?): BatchJob?
fun findBatchJobByDebouncingKey(debouncingKey: String): BatchJob?
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ project(':server-app').afterEvaluate {
task startDbChangelogContainer {
doLast {
exec {
commandLine "docker", "run", "-e", "POSTGRES_PASSWORD=postgres", "-d", "-p55438:5432", "--name", dbSchemaContainerName, "postgres:13"
commandLine "docker", "run", "-e", "POSTGRES_PASSWORD=postgres", "-d", "-p55432:5432", "--name", dbSchemaContainerName, "postgres:13"
}
Thread.sleep(5000)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
visitProjectDashboard,
} from '../../../common/shared';

describe('Server admin 1', () => {
describe('Server admin 1', { retries: { runMode: 5 } }, () => {
it('admin', () => {
visitProjectWithPermissions({ scopes: ['admin'] }).then((projectInfo) => {
// login as admin
Expand Down

0 comments on commit 5fedace

Please sign in to comment.