Class: Logical::Naf::JobStatuses::Terminated

Inherits:
Object
  • Object
show all
Defined in:
app/models/logical/naf/job_statuses/terminated.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
# File 'app/models/logical/naf/job_statuses/terminated.rb', line 6

def self.all(conditions)
  "  (\n    SELECT\n      hj.*, NULL AS \"historical_job_id\"\n    FROM\n      \"\#{::Naf.schema_name}\".\"historical_jobs\" AS hj\n    WHERE\n      hj.request_to_terminate IS TRUE AND hj.finished_at IS NULL\n      \#{conditions}\n    ORDER BY\n      finished_at DESC NULLS LAST\n  )\n  SQL\nend\n"