@@ -41,8 +41,9 @@ $ -> |
||
| 41 | 41 |
sinceId ?= json.max_id |
| 42 | 42 |
currentJobs = [json.pending, json.awaiting_retry, json.recent_failures] |
| 43 | 43 |
if document.location.pathname == '/jobs' && $(".modal[aria-hidden=false]").length == 0 && previousJobs? && previousJobs.join(',') != currentJobs.join(',')
|
| 44 |
- $.get '/jobs', (data) => |
|
| 45 |
- $("#main-content").html(data)
|
|
| 44 |
+ if !document.location.search || document.location.search == '?page=1' |
|
| 45 |
+ $.get '/jobs', (data) => |
|
| 46 |
+ $("#main-content").html(data)
|
|
| 46 | 47 |
previousJobs = currentJobs |
| 47 | 48 |
|
| 48 | 49 |
window.workerCheckTimeout = setTimeout check, 2000 |
@@ -49,6 +49,7 @@ class JobsController < ApplicationController |
||
| 49 | 49 |
end |
| 50 | 50 |
|
| 51 | 51 |
private |
| 52 |
+ |
|
| 52 | 53 |
def running? |
| 53 | 54 |
(@job.locked_at || @job.locked_by) && @job.failed_at.nil? |
| 54 | 55 |
end |