aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/jobs/enqueued_jobs.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/jobs/enqueued_jobs.rb b/app/jobs/enqueued_jobs.rb
index c394611..220899c 100644
--- a/app/jobs/enqueued_jobs.rb
+++ b/app/jobs/enqueued_jobs.rb
@@ -1,12 +1,9 @@
module EnqueuedJobs
def enqueued_jobs(argument = nil)
- if argument
- condition = " AND args->>0 = '#{argument}'"
- else
- condition = ""
- end
-
- Que.execute("SELECT * FROM que_jobs WHERE job_class = '#{name}'#{condition}")
+ condition = argument ? " AND args->>0 = '#{argument}'" : ''
+
+ Que.execute(
+ "SELECT * FROM que_jobs WHERE job_class = '#{name}'#{condition}"
+ )
end
end
-