que-view 0.3.7 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 892e7e3d60cac8ff0d076575cb10454e88a2210f537d446bf8af5942f8ba945c
|
4
|
+
data.tar.gz: 92b8d7b993e6d9e6d7c572a144b63a8b00025e4ee9e28096f177f77bc41203f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a67ca26a2c007d69be9bd7a036a726cc129bb083c9dd86671edd5aaa70882130158b2f8d7573574785b7523b3b2c2c06cad25bfb850e8d5d52dda694192e9eb
|
7
|
+
data.tar.gz: 7b9e498a11c818b8f8cb6d67ba1d816d5d3a4387147fb7ae33ca31dfb400fc51d00e974e1ccacb7683aff92da0090bd170909729809cc0255255d82d0f73d120
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateQueSchema < ActiveRecord::Migration[7.1]
|
2
|
+
def up
|
3
|
+
# Whenever you use Que in a migration, always specify the version you're
|
4
|
+
# migrating to. If you're unsure what the current version is, check the
|
5
|
+
# changelog.
|
6
|
+
Que.migrate!(version: 7)
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
# Migrate to version 0 to remove Que entirely.
|
11
|
+
Que.migrate!(version: 0)
|
12
|
+
end
|
13
|
+
end
|
data/lib/que/view/dsl.rb
CHANGED
@@ -95,7 +95,7 @@ module Que
|
|
95
95
|
SELECT count(*) AS total,
|
96
96
|
count(locks.job_id) AS running,
|
97
97
|
coalesce(sum((error_count > 0 AND locks.job_id IS NULL AND expired_at IS NULL)::int), 0) AS failing,
|
98
|
-
coalesce(sum((error_count = 0 AND locks.job_id IS NULL)::int), 0) AS scheduled,
|
98
|
+
coalesce(sum((error_count = 0 AND locks.job_id IS NULL AND finished_at IS NULL AND expired_at 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
|
101
101
|
FROM que_jobs
|
@@ -121,7 +121,7 @@ module Que
|
|
121
121
|
WHEN expired_at IS NOT NULL THEN 'expired'
|
122
122
|
WHEN finished_at IS NOT NULL THEN 'finished'
|
123
123
|
WHEN locks.job_id IS NULL AND error_count > 0 AND expired_at IS NULL THEN 'failing'
|
124
|
-
WHEN locks.job_id IS NULL AND error_count = 0 THEN 'scheduled'
|
124
|
+
WHEN locks.job_id IS NULL AND error_count = 0 AND finished_at IS NULL AND expired_at IS NULL THEN 'scheduled'
|
125
125
|
ELSE 'running'
|
126
126
|
END status
|
127
127
|
FROM que_jobs
|
@@ -135,7 +135,7 @@ module Que
|
|
135
135
|
WHEN expired_at IS NOT NULL THEN 'expired'
|
136
136
|
WHEN finished_at IS NOT NULL THEN 'finished'
|
137
137
|
WHEN locks.job_id IS NULL AND error_count > 0 AND expired_at IS NULL THEN 'failing'
|
138
|
-
WHEN locks.job_id IS NULL AND error_count = 0 THEN 'scheduled'
|
138
|
+
WHEN locks.job_id IS NULL AND error_count = 0 AND finished_at IS NULL AND expired_at IS NULL THEN 'scheduled'
|
139
139
|
ELSE 'running'
|
140
140
|
END
|
141
141
|
SQL
|
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.
|
4
|
+
version: 0.4.0
|
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-07-
|
11
|
+
date: 2024-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: que
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.39'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-factory_bot
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rubocop-performance
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +150,48 @@ dependencies:
|
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0.6'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop-rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop-rspec_rails
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '2.0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '2.0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: sassc-rails
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
139
195
|
description: Rails engine as web interface for Que for inspecting jobs.
|
140
196
|
email:
|
141
197
|
- kortirso@gmail.com
|
@@ -159,6 +215,7 @@ files:
|
|
159
215
|
- app/views/que/view/queue_metrics/index.html.erb
|
160
216
|
- app/views/que/view/welcome/index.html.erb
|
161
217
|
- config/routes.rb
|
218
|
+
- db/migrate/20240731072914_create_que_schema.rb
|
162
219
|
- lib/que/view.rb
|
163
220
|
- lib/que/view/configuration.rb
|
164
221
|
- lib/que/view/dsl.rb
|