falqon 1.1.0 → 1.2.0
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 +11 -4
- data/lib/falqon/cli.rb +7 -132
- data/lib/falqon/{cli → commands}/base.rb +1 -1
- data/lib/falqon/{cli → commands}/clear.rb +1 -1
- data/lib/falqon/{cli → commands}/delete.rb +1 -1
- data/lib/falqon/{cli → commands}/kill.rb +1 -1
- data/lib/falqon/{cli → commands}/list.rb +1 -1
- data/lib/falqon/{cli → commands}/refill.rb +1 -1
- data/lib/falqon/{cli → commands}/revive.rb +1 -1
- data/lib/falqon/{cli → commands}/schedule.rb +2 -2
- data/lib/falqon/{cli → commands}/show.rb +1 -1
- data/lib/falqon/{cli → commands}/stats.rb +1 -1
- data/lib/falqon/{cli → commands}/status.rb +1 -1
- data/lib/falqon/{cli → commands}/version.rb +1 -1
- data/lib/falqon/commands.rb +159 -0
- data/lib/falqon/version.rb +1 -1
- data/lib/falqon.rb +1 -0
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6df392504c2ce1ad80e43fa176f12ce54c1f270ec3e2be706b763d6c76a27a72
|
4
|
+
data.tar.gz: 48b241333d45181d7575b0f776604f2d70820c7b473274aaf34a90fcc361afa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02ba22201c385d00fe57f848c748900f0feb0aa1b04b50386cbef4e9fefe825e69035d618a8a94630cde7f203daea3b1ddc5173b65d9d53a3b708270e3adb3b2
|
7
|
+
data.tar.gz: 0b8e7cf96eac72efdc96b4a0911ea7da0a2cfc1669bec8169c9925b4a41ed1000cbf68c910c57d01bbfecf2fb326c27717bb0d0f4941eedf7923402e07499767
|
data/CHANGELOG.md
CHANGED
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
13
13
|
|
14
14
|
### Removed
|
15
15
|
|
16
|
+
## Falqon v1.2.0 (2025-05-18)
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- Falqon CLI: automatically detect and require Falqon Pro
|
21
|
+
|
16
22
|
## Falqon v1.1.0 (2025-05-18)
|
17
23
|
|
18
24
|
### Changed
|
@@ -35,7 +41,8 @@ Initial release
|
|
35
41
|
|
36
42
|
## Falqon v0.0.1 (2023-06-22)
|
37
43
|
|
38
|
-
[unreleased]: https://github.com/floriandejonckheere/falqon/compare/v1.
|
39
|
-
[1.
|
40
|
-
[1.
|
41
|
-
[
|
44
|
+
[unreleased]: https://github.com/floriandejonckheere/falqon/compare/v1.2.0...HEAD
|
45
|
+
[1.2.0]: https://github.com/floriandejonckheere/falqon/releases/tag/v1.2.0
|
46
|
+
[1.1.0]: https://github.com/floriandejonckheere/falqon/releases/tag/v1.1.0
|
47
|
+
[1.0.0]: https://github.com/floriandejonckheere/falqon/releases/tag/v1.0.0
|
48
|
+
[0.1.0]: https://github.com/floriandejonckheere/falqon/releases/tag/v0.1.0
|
data/lib/falqon/cli.rb
CHANGED
@@ -29,140 +29,15 @@ module Falqon
|
|
29
29
|
true
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
# @!visibility private
|
34
|
-
def version
|
35
|
-
Version
|
36
|
-
.new(options)
|
37
|
-
.call
|
38
|
-
end
|
39
|
-
|
40
|
-
desc "list", "Display all active (registered) queues"
|
41
|
-
# @!visibility private
|
42
|
-
def list
|
43
|
-
List
|
44
|
-
.new(options)
|
45
|
-
.call
|
46
|
-
end
|
47
|
-
|
48
|
-
desc "status", "Display queue status"
|
49
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name"
|
50
|
-
# @!visibility private
|
51
|
-
def status
|
52
|
-
Status
|
53
|
-
.new(options)
|
54
|
-
.call
|
55
|
-
end
|
56
|
-
|
57
|
-
desc "stats", "Display queue statistics"
|
58
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name"
|
59
|
-
# @!visibility private
|
60
|
-
def stats
|
61
|
-
Stats
|
62
|
-
.new(options)
|
63
|
-
.call
|
64
|
-
end
|
65
|
-
|
66
|
-
desc "show", "Display messages in a queue"
|
67
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
68
|
-
|
69
|
-
option :pending, type: :boolean, desc: "Display pending messages (default)"
|
70
|
-
option :processing, type: :boolean, desc: "Display processing messages"
|
71
|
-
option :dead, type: :boolean, desc: "Display dead messages"
|
72
|
-
|
73
|
-
option :data, aliases: "-d", type: :boolean, desc: "Display raw data"
|
74
|
-
option :meta, aliases: "-m", type: :boolean, desc: "Display additional metadata"
|
75
|
-
|
76
|
-
option :head, type: :numeric, desc: "Display N messages from head of queue"
|
77
|
-
option :tail, type: :numeric, desc: "Display N messages from tail of queue"
|
78
|
-
option :index, type: :numeric, desc: "Display message at index N", repeatable: true
|
79
|
-
option :range, type: :array, desc: "Display messages at index N to M", banner: "N M"
|
80
|
-
|
81
|
-
option :id, type: :numeric, desc: "Display message with ID N", repeatable: true
|
82
|
-
# @!visibility private
|
83
|
-
def show
|
84
|
-
Show
|
85
|
-
.new(options)
|
86
|
-
.call
|
87
|
-
end
|
88
|
-
|
89
|
-
desc "delete", "Delete messages from a queue"
|
90
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
91
|
-
|
92
|
-
option :pending, type: :boolean, desc: "Delete only pending messages (default)"
|
93
|
-
option :processing, type: :boolean, desc: "Delete only processing messages"
|
94
|
-
option :dead, type: :boolean, desc: "Delete only dead messages"
|
32
|
+
include Falqon::Commands
|
95
33
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
option :range, type: :array, desc: "Delete messages at index N to M", banner: "N M"
|
34
|
+
begin
|
35
|
+
require "falqon/pro"
|
36
|
+
require "falqon/pro/commands"
|
100
37
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
Delete
|
105
|
-
.new(options)
|
106
|
-
.call
|
107
|
-
end
|
108
|
-
|
109
|
-
desc "kill", "Kill messages in a queue"
|
110
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
111
|
-
|
112
|
-
option :pending, type: :boolean, desc: "Kill only pending messages (default)"
|
113
|
-
option :processing, type: :boolean, desc: "Kill only processing messages"
|
114
|
-
|
115
|
-
option :head, type: :numeric, desc: "Kill N messages from head of queue"
|
116
|
-
option :tail, type: :numeric, desc: "Kill N messages from tail of queue"
|
117
|
-
option :index, type: :numeric, desc: "Kill message at index N", repeatable: true
|
118
|
-
option :range, type: :array, desc: "Kill messages at index N to M", banner: "N M"
|
119
|
-
|
120
|
-
option :id, type: :numeric, desc: "Kill message with ID N", repeatable: true
|
121
|
-
# @!visibility private
|
122
|
-
def kill
|
123
|
-
Kill
|
124
|
-
.new(options)
|
125
|
-
.call
|
126
|
-
end
|
127
|
-
|
128
|
-
desc "clear", "Clear messages from a queue"
|
129
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
130
|
-
|
131
|
-
option :pending, type: :boolean, desc: "Clear only pending messages"
|
132
|
-
option :processing, type: :boolean, desc: "Clear only processing messages"
|
133
|
-
option :dead, type: :boolean, desc: "Clear only dead messages"
|
134
|
-
# @!visibility private
|
135
|
-
def clear
|
136
|
-
Clear
|
137
|
-
.new(options)
|
138
|
-
.call
|
139
|
-
end
|
140
|
-
|
141
|
-
desc "refill", "Refill queue (move processing messages to pending)"
|
142
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
143
|
-
# @!visibility private
|
144
|
-
def refill
|
145
|
-
Refill
|
146
|
-
.new(options)
|
147
|
-
.call
|
148
|
-
end
|
149
|
-
|
150
|
-
desc "revive", "Revive queue (move dead messages to pending)"
|
151
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
152
|
-
# @!visibility private
|
153
|
-
def revive
|
154
|
-
Revive
|
155
|
-
.new(options)
|
156
|
-
.call
|
157
|
-
end
|
158
|
-
|
159
|
-
desc "schedule", "Schedule failed messages for a retry"
|
160
|
-
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
161
|
-
# @!visibility private
|
162
|
-
def schedule
|
163
|
-
Schedule
|
164
|
-
.new(options)
|
165
|
-
.call
|
38
|
+
include Falqon::Pro::Commands
|
39
|
+
rescue LoadError
|
40
|
+
nil
|
166
41
|
end
|
167
42
|
end
|
168
43
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Falqon
|
4
|
-
|
4
|
+
module Commands
|
5
5
|
# Schedule failed messages for a retry
|
6
6
|
#
|
7
7
|
# This command moves all eligible messages from the scheduled queue back to the head of the pending queue (in order).
|
@@ -16,7 +16,7 @@ module Falqon
|
|
16
16
|
# @example Schedule eligible failed messages for retry
|
17
17
|
# $ falqon schedule --queue jobs
|
18
18
|
# Scheduled 3 messages for a retry in queue jobs
|
19
|
-
class Schedule < Falqon::
|
19
|
+
class Schedule < Falqon::Commands::Base
|
20
20
|
# @!visibility private
|
21
21
|
def validate
|
22
22
|
raise "No queue registered with this name: #{options[:queue]}" if options[:queue] && !Falqon::Queue.all.map(&:name).include?(options[:queue])
|
@@ -0,0 +1,159 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
|
5
|
+
module Falqon
|
6
|
+
##
|
7
|
+
# Falqon commands
|
8
|
+
#
|
9
|
+
module Commands
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
sig { returns(T.untyped) }
|
13
|
+
def options # rubocop:disable Lint/UselessMethodDefinition
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
# @!visibility private
|
18
|
+
sig { params(base: T.class_of(Thor)).void }
|
19
|
+
def self.included(base)
|
20
|
+
base.class_eval do
|
21
|
+
desc "version", "Display version"
|
22
|
+
# @!visibility private
|
23
|
+
def version
|
24
|
+
Version
|
25
|
+
.new(options)
|
26
|
+
.call
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "list", "Display all active (registered) queues"
|
30
|
+
# @!visibility private
|
31
|
+
def list
|
32
|
+
List
|
33
|
+
.new(options)
|
34
|
+
.call
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "status", "Display queue status"
|
38
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name"
|
39
|
+
# @!visibility private
|
40
|
+
def status
|
41
|
+
Status
|
42
|
+
.new(options)
|
43
|
+
.call
|
44
|
+
end
|
45
|
+
|
46
|
+
desc "stats", "Display queue statistics"
|
47
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name"
|
48
|
+
# @!visibility private
|
49
|
+
def stats
|
50
|
+
Stats
|
51
|
+
.new(options)
|
52
|
+
.call
|
53
|
+
end
|
54
|
+
|
55
|
+
desc "show", "Display messages in a queue"
|
56
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
57
|
+
|
58
|
+
option :pending, type: :boolean, desc: "Display pending messages (default)"
|
59
|
+
option :processing, type: :boolean, desc: "Display processing messages"
|
60
|
+
option :dead, type: :boolean, desc: "Display dead messages"
|
61
|
+
|
62
|
+
option :data, aliases: "-d", type: :boolean, desc: "Display raw data"
|
63
|
+
option :meta, aliases: "-m", type: :boolean, desc: "Display additional metadata"
|
64
|
+
|
65
|
+
option :head, type: :numeric, desc: "Display N messages from head of queue"
|
66
|
+
option :tail, type: :numeric, desc: "Display N messages from tail of queue"
|
67
|
+
option :index, type: :numeric, desc: "Display message at index N", repeatable: true
|
68
|
+
option :range, type: :array, desc: "Display messages at index N to M", banner: "N M"
|
69
|
+
|
70
|
+
option :id, type: :numeric, desc: "Display message with ID N", repeatable: true
|
71
|
+
# @!visibility private
|
72
|
+
def show
|
73
|
+
Show
|
74
|
+
.new(options)
|
75
|
+
.call
|
76
|
+
end
|
77
|
+
|
78
|
+
desc "delete", "Delete messages from a queue"
|
79
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
80
|
+
|
81
|
+
option :pending, type: :boolean, desc: "Delete only pending messages (default)"
|
82
|
+
option :processing, type: :boolean, desc: "Delete only processing messages"
|
83
|
+
option :dead, type: :boolean, desc: "Delete only dead messages"
|
84
|
+
|
85
|
+
option :head, type: :numeric, desc: "Delete N messages from head of queue"
|
86
|
+
option :tail, type: :numeric, desc: "Delete N messages from tail of queue"
|
87
|
+
option :index, type: :numeric, desc: "Delete message at index N", repeatable: true
|
88
|
+
option :range, type: :array, desc: "Delete messages at index N to M", banner: "N M"
|
89
|
+
|
90
|
+
option :id, type: :numeric, desc: "Delete message with ID N", repeatable: true
|
91
|
+
# @!visibility private
|
92
|
+
def delete
|
93
|
+
Delete
|
94
|
+
.new(options)
|
95
|
+
.call
|
96
|
+
end
|
97
|
+
|
98
|
+
desc "kill", "Kill messages in a queue"
|
99
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
100
|
+
|
101
|
+
option :pending, type: :boolean, desc: "Kill only pending messages (default)"
|
102
|
+
option :processing, type: :boolean, desc: "Kill only processing messages"
|
103
|
+
|
104
|
+
option :head, type: :numeric, desc: "Kill N messages from head of queue"
|
105
|
+
option :tail, type: :numeric, desc: "Kill N messages from tail of queue"
|
106
|
+
option :index, type: :numeric, desc: "Kill message at index N", repeatable: true
|
107
|
+
option :range, type: :array, desc: "Kill messages at index N to M", banner: "N M"
|
108
|
+
|
109
|
+
option :id, type: :numeric, desc: "Kill message with ID N", repeatable: true
|
110
|
+
# @!visibility private
|
111
|
+
def kill
|
112
|
+
Kill
|
113
|
+
.new(options)
|
114
|
+
.call
|
115
|
+
end
|
116
|
+
|
117
|
+
desc "clear", "Clear messages from a queue"
|
118
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
119
|
+
|
120
|
+
option :pending, type: :boolean, desc: "Clear only pending messages"
|
121
|
+
option :processing, type: :boolean, desc: "Clear only processing messages"
|
122
|
+
option :dead, type: :boolean, desc: "Clear only dead messages"
|
123
|
+
# @!visibility private
|
124
|
+
def clear
|
125
|
+
Clear
|
126
|
+
.new(options)
|
127
|
+
.call
|
128
|
+
end
|
129
|
+
|
130
|
+
desc "refill", "Refill queue (move processing messages to pending)"
|
131
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
132
|
+
# @!visibility private
|
133
|
+
def refill
|
134
|
+
Refill
|
135
|
+
.new(options)
|
136
|
+
.call
|
137
|
+
end
|
138
|
+
|
139
|
+
desc "revive", "Revive queue (move dead messages to pending)"
|
140
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
141
|
+
# @!visibility private
|
142
|
+
def revive
|
143
|
+
Revive
|
144
|
+
.new(options)
|
145
|
+
.call
|
146
|
+
end
|
147
|
+
|
148
|
+
desc "schedule", "Schedule failed messages for a retry"
|
149
|
+
option :queue, aliases: "-q", type: :string, desc: "Queue name", required: true
|
150
|
+
# @!visibility private
|
151
|
+
def schedule
|
152
|
+
Schedule
|
153
|
+
.new(options)
|
154
|
+
.call
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
data/lib/falqon/version.rb
CHANGED
data/lib/falqon.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falqon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Dejonckheere
|
@@ -96,18 +96,19 @@ files:
|
|
96
96
|
- config/inflections.rb
|
97
97
|
- lib/falqon.rb
|
98
98
|
- lib/falqon/cli.rb
|
99
|
-
- lib/falqon/
|
100
|
-
- lib/falqon/
|
101
|
-
- lib/falqon/
|
102
|
-
- lib/falqon/
|
103
|
-
- lib/falqon/
|
104
|
-
- lib/falqon/
|
105
|
-
- lib/falqon/
|
106
|
-
- lib/falqon/
|
107
|
-
- lib/falqon/
|
108
|
-
- lib/falqon/
|
109
|
-
- lib/falqon/
|
110
|
-
- lib/falqon/
|
99
|
+
- lib/falqon/commands.rb
|
100
|
+
- lib/falqon/commands/base.rb
|
101
|
+
- lib/falqon/commands/clear.rb
|
102
|
+
- lib/falqon/commands/delete.rb
|
103
|
+
- lib/falqon/commands/kill.rb
|
104
|
+
- lib/falqon/commands/list.rb
|
105
|
+
- lib/falqon/commands/refill.rb
|
106
|
+
- lib/falqon/commands/revive.rb
|
107
|
+
- lib/falqon/commands/schedule.rb
|
108
|
+
- lib/falqon/commands/show.rb
|
109
|
+
- lib/falqon/commands/stats.rb
|
110
|
+
- lib/falqon/commands/status.rb
|
111
|
+
- lib/falqon/commands/version.rb
|
111
112
|
- lib/falqon/concerns/hooks.rb
|
112
113
|
- lib/falqon/configuration.rb
|
113
114
|
- lib/falqon/connection_pool_snooper.rb
|
@@ -126,7 +127,7 @@ files:
|
|
126
127
|
- lib/generators/falqon/install.rb
|
127
128
|
homepage: https://github.com/floriandejonckheere/falqon
|
128
129
|
licenses:
|
129
|
-
- LGPL-3.0
|
130
|
+
- LGPL-3.0-or-later
|
130
131
|
metadata:
|
131
132
|
source_code_uri: https://github.com/floriandejonckheere/falqon.git
|
132
133
|
rubygems_mfa_required: 'true'
|