-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow running CLI commands without requiring DB/Redis connections
Sea-orm added support for lazy database connections. We provide a config field to allow toggling lazy database connections on or off. If lazy connections are enabled, the default `run` method will allow running CLI commands without requiring the the DB connection to be available (unless the CLI command itself attempts to execute a DB query). Closes #235
- Loading branch information
1 parent
32a98c9
commit a1732b0
Showing
7 changed files
with
107 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...fig/database/snapshots/roadster__config__database__deserialize_tests__sidekiq@case_1.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
--- | ||
source: src/config/database.rs | ||
source: src/config/database/mod.rs | ||
expression: database | ||
--- | ||
uri = 'https://example.com:1234/' | ||
auto-migrate = true | ||
connect-timeout = 1000 | ||
connect-lazy = true | ||
acquire-timeout = 1000 | ||
min-connections = 0 | ||
max-connections = 1 |
3 changes: 2 additions & 1 deletion
3
...fig/database/snapshots/roadster__config__database__deserialize_tests__sidekiq@case_2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters