que-web 0.9.1 → 0.9.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f5e06bded6cf5319e09f634fe0809caf7641d70d
4
- data.tar.gz: a406e5ba28ce34b545be8fb6b57ad33f61a5c83d
2
+ SHA256:
3
+ metadata.gz: 53df036811b3eda332469ccbb064fa0ce0ef6115a5c1e4be7bea8dae18adf612
4
+ data.tar.gz: 6e8855009352f7b0199fdbaf167ac38ad36655dce35f02aba95f1198ef1a4fba
5
5
  SHA512:
6
- metadata.gz: 81b2db6fcda3a58c41c728df545e3ba337e61dc2a4d468ba697bca8950ab52db6607adf37cb8d0701bfdbd12bfafcbee85dff313c0fbe09016caa10904070547
7
- data.tar.gz: 916b183b6e4c1f293d53094170cc640f8cf06fb330a9c6d710baa494bde0410a8ebdc1cbd2e5aa06a6d13659be3e4ef141fcc70796b25168fd9a5afed8767467
6
+ metadata.gz: a6e848926b6f28e94f119ecf888ba1b1cf10d895b77a196f68caa9f9823766eaa426bc68892b84dfd3ab42364b8f3b6ea10f897b6fb72a82b403fcc6d0897bbf
7
+ data.tar.gz: 847907469ccc57d2873b72de4d7c0af552358242757cb47c9187d3ca506feb00721c1f475f3c5f6648e373a9ed2b525ec206d87942fa15a844d3c0665bf48332
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ### Unreleased
2
+ #### Fixed:
3
+ - Fixed inconsistent pagination when several jobs have the same `run_at`
4
+
5
+ ### 0.9.3 - 2020-06-17
6
+ #### Added:
7
+ - Set expired_at=NULL when rescheduling job
8
+ - Make job search case-insensitive
9
+ - Allow to search by ActiveJob class name
10
+
11
+ ### 0.9.2 - 2020-04-24
12
+ #### Fixed:
13
+ - Fixed rendering "running" page
14
+ - Fixed displaying relative time on "failing" page
15
+
1
16
  ### 0.9.1 - 2020-04-01
2
17
  #### Fixed:
3
18
  - Fixed rendering HTML
data/docker/Gemfile.lock CHANGED
@@ -4,13 +4,13 @@ GEM
4
4
  erubis (2.7.0)
5
5
  mustermann (1.0.3)
6
6
  pg (1.0.0)
7
- puma (3.12.3)
7
+ puma (3.12.6)
8
8
  que (0.14.2)
9
9
  que-web (0.7.0)
10
10
  erubis
11
11
  que (~> 0.8)
12
12
  sinatra
13
- rack (2.0.8)
13
+ rack (2.2.3)
14
14
  rack-protection (2.0.7)
15
15
  rack
16
16
  sequel (5.5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- que-web (0.9.0)
4
+ que-web (0.9.3)
5
5
  que (~> 1.0.0.beta3)
6
6
  sinatra
7
7
 
@@ -12,11 +12,11 @@ GEM
12
12
  ruby2_keywords (~> 0.0.1)
13
13
  pg (1.2.3)
14
14
  que (1.0.0.beta4)
15
- rack (2.2.2)
15
+ rack (2.2.3)
16
16
  rack-protection (2.0.8.1)
17
17
  rack
18
18
  ruby2_keywords (0.0.2)
19
- sequel (5.30.0)
19
+ sequel (5.31.0)
20
20
  sinatra (2.0.8.1)
21
21
  mustermann (~> 1.0)
22
22
  rack (~> 2.0)
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 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,8 +64,13 @@ 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)
66
- ORDER BY run_at
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
+ )
73
+ ORDER BY run_at, id
67
74
  LIMIT $1::int
68
75
  OFFSET $2::int
69
76
  SQL
@@ -75,8 +82,13 @@ 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)
79
- ORDER BY run_at
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
+ )
91
+ ORDER BY run_at, id
80
92
  LIMIT $1::int
81
93
  OFFSET $2::int
82
94
  SQL
@@ -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/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 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
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.1"
7
+ spec.version = "0.9.4"
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}
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "que", "~> 1.0.0.beta3"
20
+ spec.add_dependency "que", "~> 1"
21
21
  spec.add_dependency "sinatra"
22
22
 
23
23
  spec.add_development_dependency "bundler", ">= 1.6"
@@ -25,7 +25,7 @@
25
25
  <% @list.page_jobs.each do |job| %>
26
26
  <tr>
27
27
  <td><a href="<%= link_to "jobs/#{job.id}" %>">
28
- <%= h relative_time job.run_at %></a>
28
+ <%= relative_time job.run_at %></a>
29
29
  <%= erb :_past_due, locals: {job: job} %>
30
30
  </td>
31
31
  <td><%= job.error_count %></td>
@@ -20,10 +20,12 @@
20
20
  <tbody>
21
21
  <% @list.page_jobs.each do |job| %>
22
22
  <tr>
23
- <td><%= relative_time job.run_at %></td>
23
+ <td>
24
+ <a href="<%= link_to "jobs/#{job.id}" %>"><%= relative_time job.run_at %></a>
25
+ </td>
24
26
  <td><%= h job.humanized_job_class %></td>
25
27
  <td><%= job.queue %></td>
26
- <td><pre><%= h job.args %></pre></td>
28
+ <td><pre><%= h format_args(job) %></pre></td>
27
29
  </tr>
28
30
  <% end %>
29
31
  </tbody>
@@ -24,7 +24,7 @@
24
24
  <tr>
25
25
  <td>
26
26
  <a href="<%= link_to "jobs/#{job.id}" %>"><%= relative_time job.run_at %></a>
27
- <%= erb :_past_due, locals: {job: job}%>
27
+ <%= erb :_past_due, locals: {job: job} %>
28
28
  </td>
29
29
  <td><%= h job.humanized_job_class %></td>
30
30
  <td><%= h job.queue %></td>
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.1
4
+ version: 0.9.4
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-01 00:00:00.000000000 Z
12
+ date: 2022-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: que
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 1.0.0.beta3
20
+ version: '1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 1.0.0.beta3
27
+ version: '1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: sinatra
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -161,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubyforge_project:
165
- rubygems_version: 2.5.2.3
164
+ rubygems_version: 3.0.3
166
165
  signing_key:
167
166
  specification_version: 4
168
167
  summary: A web interface for the que queue