legion-data 1.6.19 → 1.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/legion/data/local.rb +10 -1
- data/lib/legion/data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68c8710d74c2f470f06e8c669c539c4db12bc0ac25807775cc85beb4e972e3b7
|
|
4
|
+
data.tar.gz: 5234ddf1a5d57c52e2af42c5264256327c746d3adcdc3117f3d73e04e127a481
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f514db438336d661316ee66b7171ad4955a755053642a15fce766f32d35bded7c815ea9cc2e9372cb1d831a29413d30e6a9f607955b725a0a959b155ba9bfc72
|
|
7
|
+
data.tar.gz: 660ed97282f052ba1ce6b7b20651f8a7cef8b7b792329cc07326f6edf9038cefa1242bbfbf6714623bd39b763f5afd7c908d223ec2331905d90bf9725fe7543e
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.6.20] - 2026-04-03
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Local SQLite now uses WAL journal mode, 30s busy_timeout, and synchronous=NORMAL to reduce write contention
|
|
9
|
+
- Local SQLite path resolved to `~/.legionio/` absolute path instead of using relative CWD
|
|
10
|
+
|
|
5
11
|
## [1.6.19] - 2026-04-02
|
|
6
12
|
|
|
7
13
|
### Changed
|
data/lib/legion/data/local.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'fileutils'
|
|
3
4
|
require 'legion/logging/helper'
|
|
4
5
|
|
|
5
6
|
require 'sequel'
|
|
@@ -17,6 +18,11 @@ module Legion
|
|
|
17
18
|
return if @connected
|
|
18
19
|
|
|
19
20
|
db_file = database || local_settings[:database] || 'legionio_local.db'
|
|
21
|
+
unless File.absolute_path?(db_file)
|
|
22
|
+
base_dir = File.expand_path('~/.legionio')
|
|
23
|
+
FileUtils.mkdir_p(base_dir)
|
|
24
|
+
db_file = File.join(base_dir, db_file)
|
|
25
|
+
end
|
|
20
26
|
@db_path = db_file
|
|
21
27
|
|
|
22
28
|
sqlite_defaults = Legion::Data::Connection::ADAPTER_DEFAULTS.fetch(:sqlite, {})
|
|
@@ -39,9 +45,12 @@ module Legion
|
|
|
39
45
|
end
|
|
40
46
|
|
|
41
47
|
@connection = ::Sequel.connect(opts)
|
|
48
|
+
@connection.run('PRAGMA journal_mode=WAL')
|
|
49
|
+
@connection.run('PRAGMA busy_timeout=30000')
|
|
50
|
+
@connection.run('PRAGMA synchronous=NORMAL')
|
|
42
51
|
@connected = true
|
|
43
52
|
run_migrations
|
|
44
|
-
log.info "Legion::Data::Local connected to #{db_file}"
|
|
53
|
+
log.info "Legion::Data::Local connected to #{db_file} (WAL mode, 30s busy_timeout)"
|
|
45
54
|
rescue StandardError => e
|
|
46
55
|
handle_exception(e, level: :error, handled: false, operation: :local_setup, database: db_file)
|
|
47
56
|
raise
|
data/lib/legion/data/version.rb
CHANGED