6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'app/models/logical/naf/job_statuses/queued.rb', line 6
def self.all(conditions)
" (\n SELECT DISTINCT\n j.*, jp.\"historical_job_id\"\n FROM\n \"\#{::Naf.schema_name}\".\"historical_jobs\" AS j\n LEFT JOIN\n \"\#{::Naf.schema_name}\".\"historical_job_prerequisites\" AS jp\n ON j.\"id\" = jp.\"historical_job_id\"\n WHERE\n j.finished_at IS NULL AND\n j.request_to_terminate = false AND\n jp.historical_job_id IS NULL AND\n j.started_at IS NULL\n \#{conditions}\n ORDER BY\n created_at desc\n )\n SQL\nend\n"
|