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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5ec622e1da6e6817740382486683835409a18979736d20a19d9a0b15997756c
4
- data.tar.gz: 1bd133aac4659349c11056e3ccb834cf4de5ba70dfbcb10434f09e4c4e92a008
3
+ metadata.gz: ebaed73a196599d197e408d743f11878983bd41946128b414a761f41212f798b
4
+ data.tar.gz: cbf8d59327853afaea14ffc79d6b6633bd56c046b64b8b2200ca29251bc4b2ae
5
5
  SHA512:
6
- metadata.gz: ea0a161c97f6fb5ddfcb3483a67168f77683c221f63078caf00768ba07029e3441f10d17d96e1b10c891fec28aaf62ba4865480d95168ce60d85db3061855ae4
7
- data.tar.gz: 567abfc22ac510368b8f8475c4c45ae458b58f4b4fb278dcacb992134a9dd1d4720d8964af8fd709b60f11ef32a5be663a024c65d222614ae0c4677168d4f61c
6
+ metadata.gz: 6674c985452e1bf8c7aaf159b6efd1d0ef3008bb0020abe7625799a422e76246443c953ff5d4eb7676f8bf0cf4a39e1bee71fcdf3ac97bafafd8f9aa292f6c96
7
+ data.tar.gz: 39c94ab7f64cb5bf20c2e978aa369fd675dde28b058f52ffb4e2af4fec7c91f8d4d14b904b86d0e2f5c35ef02053be68e3b3d1a8edc02aa4d8a1e8941733436f
@@ -1,3 +1,9 @@
1
+ ### 0.9.3 - 2020-06-17
2
+ #### Added:
3
+ - Set expired_at=NULL when rescheduling job
4
+ - Make job search case-insensitive
5
+ - Allow to search by ActiveJob class name
6
+
1
7
  ### 0.9.2 - 2020-04-24
2
8
  #### Fixed:
3
9
  - Fixed rendering "running" page
@@ -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 runnning"
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 runnning"
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
@@ -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 LIKE ($1)
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 AND error_count > 0 AND job_class LIKE ($3)
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 AND error_count = 0 AND job_class LIKE ($3)
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
@@ -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.2"
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.2
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-04-24 00:00:00.000000000 Z
12
+ date: 2020-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: que