Sha256: 24465f3194c038d5c46f8c9e4dd90a728cef3931a1dbf10a4a1ac6e5e75836f6
Contents?: true
Size: 585 Bytes
Versions: 7
Compression:
Stored size: 585 Bytes
Contents
module Marty module BackgroundJob module FetchMissingInScheduleCronJobs def self.call in_dashboard = Marty::BackgroundJob::Schedule.all names_conditions = in_dashboard.map do |schedule| "%job_class: #{schedule.job_class}\n%" end djs = Delayed::Job. where.not(cron: nil). where.not(cron: ''). where("handler ILIKE '%job_class:%'") djs.where.not('handler ILIKE ANY ( array[?] )', names_conditions). or(djs.where.not(schedule_id: in_dashboard.map(&:id))) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems