que-web 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/que/web.rb +2 -2
- data/lib/que/web/sql.rb +18 -5
- data/que-web.gemspec +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: ebaed73a196599d197e408d743f11878983bd41946128b414a761f41212f798b
|
4
|
+
data.tar.gz: cbf8d59327853afaea14ffc79d6b6633bd56c046b64b8b2200ca29251bc4b2ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6674c985452e1bf8c7aaf159b6efd1d0ef3008bb0020abe7625799a422e76246443c953ff5d4eb7676f8bf0cf4a39e1bee71fcdf3ac97bafafd8f9aa292f6c96
|
7
|
+
data.tar.gz: 39c94ab7f64cb5bf20c2e978aa369fd675dde28b058f52ffb4e2af4fec7c91f8d4d14b904b86d0e2f5c35ef02053be68e3b3d1a8edc02aa4d8a1e8941733436f
|
data/CHANGELOG.md
CHANGED
data/lib/que/web.rb
CHANGED
@@ -63,7 +63,7 @@ module Que
|
|
63
63
|
updated_rows = Que.execute SQL[:reschedule_job], [job_id, run_at]
|
64
64
|
if updated_rows.empty?
|
65
65
|
# Didn't get the advisory lock
|
66
|
-
set_flash "warning", "Job #{job_id} not rescheduled as it was already
|
66
|
+
set_flash "warning", "Job #{job_id} not rescheduled as it was already running"
|
67
67
|
else
|
68
68
|
set_flash "info", "Job #{job_id} rescheduled for #{run_at}"
|
69
69
|
end
|
@@ -101,7 +101,7 @@ module Que
|
|
101
101
|
|
102
102
|
if updated_rows.empty?
|
103
103
|
# Didn't get the advisory lock
|
104
|
-
set_flash "warning", "Job #{job_id} not deleted as it was already
|
104
|
+
set_flash "warning", "Job #{job_id} not deleted as it was already running"
|
105
105
|
else
|
106
106
|
set_flash "info", "Job #{job_id} deleted"
|
107
107
|
end
|
data/lib/que/web/sql.rb
CHANGED
@@ -20,7 +20,8 @@ def reschedule_all_jobs_query(scope)
|
|
20
20
|
<<-SQL.freeze
|
21
21
|
WITH target AS (#{scope})
|
22
22
|
UPDATE que_jobs
|
23
|
-
SET run_at = $1::timestamptz
|
23
|
+
SET run_at = $1::timestamptz,
|
24
|
+
expired_at = NULL
|
24
25
|
FROM target
|
25
26
|
WHERE target.locked
|
26
27
|
AND target.id = que_jobs.id
|
@@ -52,7 +53,8 @@ Que::Web::SQL = {
|
|
52
53
|
WHERE locktype = 'advisory'
|
53
54
|
) locks ON (que_jobs.id=locks.job_id)
|
54
55
|
WHERE
|
55
|
-
job_class
|
56
|
+
job_class ILIKE ($1)
|
57
|
+
OR que_jobs.args #>> '{0, job_class}' ILIKE ($1)
|
56
58
|
SQL
|
57
59
|
failing_jobs: <<-SQL.freeze,
|
58
60
|
SELECT que_jobs.*
|
@@ -62,7 +64,12 @@ Que::Web::SQL = {
|
|
62
64
|
FROM pg_locks
|
63
65
|
WHERE locktype = 'advisory'
|
64
66
|
) locks ON (que_jobs.id=locks.job_id)
|
65
|
-
WHERE locks.job_id IS NULL
|
67
|
+
WHERE locks.job_id IS NULL
|
68
|
+
AND error_count > 0
|
69
|
+
AND (
|
70
|
+
job_class ILIKE ($3)
|
71
|
+
OR que_jobs.args #>> '{0, job_class}' ILIKE ($3)
|
72
|
+
)
|
66
73
|
ORDER BY run_at
|
67
74
|
LIMIT $1::int
|
68
75
|
OFFSET $2::int
|
@@ -75,7 +82,12 @@ Que::Web::SQL = {
|
|
75
82
|
FROM pg_locks
|
76
83
|
WHERE locktype = 'advisory'
|
77
84
|
) locks ON (que_jobs.id=locks.job_id)
|
78
|
-
WHERE locks.job_id IS NULL
|
85
|
+
WHERE locks.job_id IS NULL
|
86
|
+
AND error_count = 0
|
87
|
+
AND (
|
88
|
+
job_class ILIKE ($3)
|
89
|
+
OR que_jobs.args #>> '{0, job_class}' ILIKE ($3)
|
90
|
+
)
|
79
91
|
ORDER BY run_at
|
80
92
|
LIMIT $1::int
|
81
93
|
OFFSET $2::int
|
@@ -86,7 +98,8 @@ Que::Web::SQL = {
|
|
86
98
|
reschedule_job: <<-SQL.freeze,
|
87
99
|
WITH target AS (#{lock_job_sql})
|
88
100
|
UPDATE que_jobs
|
89
|
-
SET run_at = $2::timestamptz
|
101
|
+
SET run_at = $2::timestamptz,
|
102
|
+
expired_at = NULL
|
90
103
|
FROM target
|
91
104
|
WHERE target.locked
|
92
105
|
AND target.id = que_jobs.id
|
data/que-web.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "que-web"
|
7
|
-
spec.version = "0.9.
|
7
|
+
spec.version = "0.9.3"
|
8
8
|
spec.authors = ["Jason Staten", "Bruno Porto"]
|
9
9
|
spec.email = ["jstaten07@gmail.com", "brunotporto@gmail.com"]
|
10
10
|
spec.summary = %q{A web interface for the que queue}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: que-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Staten
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: que
|