que-view 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/que/view/queue_metrics_controller.rb +1 -1
- data/lib/que/view/dsl.rb +4 -3
- data/lib/que/view/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcbc566936eae22f23cba44ed6908437fba07dbf621128895f4fe4e40319ad61
|
4
|
+
data.tar.gz: a7f2213f756286321699a96f10e1b69c1578e91dff46daa877c37db41898efde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6250a8886b4d258f080d4133caddff6292295d4a586dadf5b678fbb98052e59a78ec2de42eaa928dc6def2de8a2a0800e086528c150111f1b80c171405eac0de
|
7
|
+
data.tar.gz: 4a41eff359089fd195b47408a64f0fa94805c1230fbf40d3cbf2001f76e8e465040d78f79f8186411c4fa46a90d979b21b3bae3796c5524f6f98833844be24c3
|
@@ -19,7 +19,7 @@ module Que
|
|
19
19
|
@queue_latencies =
|
20
20
|
::Que::View
|
21
21
|
.fetch_queue_latencies(@queue_metrics.keys)
|
22
|
-
.transform_values { |value| current_time - value.to_time.to_i }
|
22
|
+
.transform_values { |value| value ? (current_time - value.to_time.to_i) : 0 }
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/lib/que/view/dsl.rb
CHANGED
@@ -94,7 +94,7 @@ module Que
|
|
94
94
|
<<-SQL.squish
|
95
95
|
SELECT count(*) AS total,
|
96
96
|
count(locks.job_id) AS running,
|
97
|
-
coalesce(sum((error_count > 0 AND locks.job_id IS NULL)::int), 0) AS failing,
|
97
|
+
coalesce(sum((error_count > 0 AND locks.job_id IS NULL AND expired_at IS NULL)::int), 0) AS failing,
|
98
98
|
coalesce(sum((error_count = 0 AND locks.job_id IS NULL)::int), 0) AS scheduled,
|
99
99
|
coalesce(sum((finished_at IS NOT NULL)::int), 0) AS finished,
|
100
100
|
coalesce(sum((expired_at IS NOT NULL)::int), 0) AS expired
|
@@ -120,7 +120,7 @@ module Que
|
|
120
120
|
CASE
|
121
121
|
WHEN expired_at IS NOT NULL THEN 'expired'
|
122
122
|
WHEN finished_at IS NOT NULL THEN 'finished'
|
123
|
-
WHEN locks.job_id IS NULL AND error_count > 0 THEN 'failing'
|
123
|
+
WHEN locks.job_id IS NULL AND error_count > 0 AND expired_at IS NULL THEN 'failing'
|
124
124
|
WHEN locks.job_id IS NULL AND error_count = 0 THEN 'scheduled'
|
125
125
|
ELSE 'running'
|
126
126
|
END status
|
@@ -134,7 +134,7 @@ module Que
|
|
134
134
|
CASE
|
135
135
|
WHEN expired_at IS NOT NULL THEN 'expired'
|
136
136
|
WHEN finished_at IS NOT NULL THEN 'finished'
|
137
|
-
WHEN locks.job_id IS NULL AND error_count > 0 THEN 'failing'
|
137
|
+
WHEN locks.job_id IS NULL AND error_count > 0 AND expired_at IS NULL THEN 'failing'
|
138
138
|
WHEN locks.job_id IS NULL AND error_count = 0 THEN 'scheduled'
|
139
139
|
ELSE 'running'
|
140
140
|
END
|
@@ -174,6 +174,7 @@ module Que
|
|
174
174
|
where_condition = <<-SQL.squish
|
175
175
|
WHERE locks.job_id IS NULL
|
176
176
|
AND error_count > 0
|
177
|
+
AND expired_at IS NULL
|
177
178
|
#{search_condition(params)}
|
178
179
|
SQL
|
179
180
|
fetch_jobs_sql(per_page, offset, where_condition)
|
data/lib/que/view/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: que-view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdanov Anton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: que
|