lex-scheduler 0.3.0 → 0.3.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf1af6af48562148233fe96ef358fea8d3879a17431ce55cf2d05478361a30d6
|
|
4
|
+
data.tar.gz: b698cb1ac133c5432039f8fb29bd70a1f36c62a57e238f1c55638f02961c57a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11120040447d3fe09a1ef3b4b7b0ca560a3884f3716822e414e41ec3970b8b9bdd425476bcf854c90a8610740f943856fe4347ef9090d892644d314bb1ad0ae6
|
|
7
|
+
data.tar.gz: f951df0d29500f9ae001f37dc41b7429caeca38207d80b5f9bebef27f3c022a31973822517383f4d35bffdbd29a46caac3b2d5ba277026316993423b67a15612
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- `RunScheduler` actor now uses `Singleton` mixin for leader election instead of soft cache lock
|
|
7
|
+
- `refresh` runner is now a no-op (leadership enforcement moved to actor level)
|
|
8
|
+
- `schedule_tasks` no longer checks `scheduler_schedule_lock` cache key (leadership enforced by Singleton mixin)
|
|
9
|
+
|
|
3
10
|
## [0.3.0] - 2026-03-18
|
|
4
11
|
|
|
5
12
|
### Fixed
|
data/CLAUDE.md
CHANGED
|
@@ -37,6 +37,7 @@ Legion::Extensions::Scheduler
|
|
|
37
37
|
│ ├── 004_schedule_logs_indexes
|
|
38
38
|
│ ├── 005_add_payload_column
|
|
39
39
|
│ └── 006_add_transform_to_schedule
|
|
40
|
+
├── Client # Standalone client including Schedule runner; accepts injected data_model and fugit
|
|
40
41
|
└── Transport/
|
|
41
42
|
├── Queues/Schedule # Schedule queue
|
|
42
43
|
└── Messages/
|
data/README.md
CHANGED
|
@@ -33,6 +33,17 @@ Legion::Extensions::Scheduler::Data::Models::Schedule.insert(
|
|
|
33
33
|
)
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
## Standalone Client
|
|
37
|
+
|
|
38
|
+
`Legion::Extensions::Scheduler::Client` provides access to the Schedule runner:
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
require 'legion/extensions/scheduler/client'
|
|
42
|
+
client = Legion::Extensions::Scheduler::Client.new
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Accepts optional `data_model:` and `fugit:` kwargs for injection (useful in tests).
|
|
46
|
+
|
|
36
47
|
## Requirements
|
|
37
48
|
|
|
38
49
|
- Ruby >= 3.4
|
|
@@ -17,13 +17,9 @@ module Legion
|
|
|
17
17
|
Legion::Extensions::Scheduler::Transport::Messages::Refresh.new.publish
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def refresh(**)
|
|
21
|
-
Legion::Cache.set('scheduler_schedule_lock', Legion::Settings[:client][:name], 2)
|
|
22
|
-
end
|
|
20
|
+
def refresh(**); end
|
|
23
21
|
|
|
24
22
|
def schedule_tasks(**)
|
|
25
|
-
return unless Legion::Cache.get('scheduler_schedule_lock') == Legion::Settings[:client][:name]
|
|
26
|
-
|
|
27
23
|
models_class::Schedule.where(active: 1).each do |row|
|
|
28
24
|
last_run = row.values[:last_run] || Time.at(0)
|
|
29
25
|
|