Skip to content

Commit

Permalink
Prevent ingestion of jobs with 0 start or end time
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpalmer committed Jul 27, 2017
1 parent 723b55a commit 7b4ee6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/OpenXdmod/Ingestor/Shredded/Jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ public function __construct($dest_db, $src_db)
timelimit,
node_list
FROM shredded_job
WHERE start_time > 0
AND end_time > 0
';

$sql = 'SELECT MAX(id) AS max_id FROM staging_job';
list($row) = $dest_db->query($sql);
if ($row['max_id'] != null) {
$src_query .= 'WHERE shredded_job_id > ' . $row['max_id'];
$src_query .= 'AND shredded_job_id > ' . $row['max_id'];
}

parent::__construct(
Expand Down

0 comments on commit 7b4ee6d

Please # to comment.