Skip to content

Commit 46b00fe

Browse files
authored
Merge pull request #5 from wildbit/db-init-fix
Fix a failure to create required MySQL tables.
2 parents 9236bf4 + b6c21d9 commit 46b00fe

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ All notable changes to this project are documented in this file. This change log
44
## [Unreleased]
55

66
### Fixed
7-
- Internal: Fixed possible test failures in non-UTC timezones.
8-
- Internal: Fixed graceful shutdown test.
7+
- Fix `queue/initialize!` that fails to create MySQL tables due to index conflict.
8+
- Internal: Fix possible test failures in non-UTC timezones.
9+
- Internal: Fix graceful shutdown test.
910

1011
### Changed
1112
- Use JVM time when querying for pending jobs instead of relying on UTC.

src/mysql_queue/core.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@
304304
(defn initialize!
305305
"Create required MySQL tables if they don't exist. Returns true."
306306
[db-conn]
307-
(queries/create-jobs! db-conn)
308307
(queries/create-scheduled-jobs! db-conn)
308+
(queries/create-jobs! db-conn)
309309
true)
310310

311311
(defn schedule-job

test/mysql_queue/core_test.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
(defn setup-db
1919
[f]
20-
(queries/create-scheduled-jobs! db-conn)
21-
(queries/create-jobs! db-conn)
20+
(initialize! db-conn)
2221
(f))
2322

2423
(defn clean-up

0 commit comments

Comments
 (0)