Class: Logical::Naf::JobStatuses::Finished

Inherits:
Object
  • Object
show all
Defined in:
app/models/logical/naf/job_statuses/finished.rb

Class Method Summary collapse

Class Method Details

.all(conditions) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/models/logical/naf/job_statuses/finished.rb', line 6

def self.all(conditions)
  "    (\n      SELECT\n        j.*, null AS \"historical_job_id\"\n      FROM\n        \"\#{::Naf.schema_name}\".\"historical_jobs\" AS j\n      WHERE\n        (j.finished_at IS NOT NULL OR\n         j.request_to_terminate = true)\n        \#{conditions}\n      ORDER BY\n        finished_at DESC NULLS LAST\n    )\n  SQL\nend\n"