Sha256: 0c9a99699e3a13eebe32cb0dbb9ee7e73287b730a31b701359a6174fa5386f3a

Contents?: true

Size: 793 Bytes

Versions: 23

Compression:

Stored size: 793 Bytes

Contents

module Logical
  module Naf
    module JobStatuses
      class Queued

        def self.all(conditions)
          <<-SQL
            (
              SELECT DISTINCT
                j.*, jp."historical_job_id"
              FROM
                "#{::Naf.schema_name}"."historical_jobs" AS j
              LEFT JOIN
                "#{::Naf.schema_name}"."historical_job_prerequisites" AS jp
                ON j."id" = jp."historical_job_id"
              WHERE
                j.finished_at IS NULL AND
                j.request_to_terminate = false AND
                jp.historical_job_id IS NULL AND
                j.started_at IS NULL
              #{conditions}
              ORDER BY
                created_at desc
            )
          SQL
        end

      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
naf-2.1.13 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.12 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.11 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.10 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.9 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.8 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.6 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.5 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.4 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.3 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.2 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.1 app/models/logical/naf/job_statuses/queued.rb
naf-2.1.0 app/models/logical/naf/job_statuses/queued.rb
naf-2.0.4 app/models/logical/naf/job_statuses/queued.rb
naf-2.0.3 app/models/logical/naf/job_statuses/queued.rb
naf-2.0.2 app/models/logical/naf/job_statuses/queued.rb
naf-2.0.1 app/models/logical/naf/job_statuses/queued.rb
naf-2.0.0 app/models/logical/naf/job_statuses/queued.rb
naf-1.1.4 app/models/logical/naf/job_statuses/queued.rb
naf-1.1.3 app/models/logical/naf/job_statuses/queued.rb