diff --git a/code/jobs/PruneChangesBeforeJob.php b/code/jobs/PruneChangesBeforeJob.php index b0238a9..d778249 100644 --- a/code/jobs/PruneChangesBeforeJob.php +++ b/code/jobs/PruneChangesBeforeJob.php @@ -41,13 +41,11 @@ public function getTitle() } public function process() { - if ($this->totalSteps <= 0) { - $items = DataChangeRecord::get()->filter('Created:LessThan', $this->pruneBefore); - $max = $items->max('ID'); - - $query = new SQLDelete('DataChangeRecord', '"ID" < \'' . $max . '\''); - $query->execute(); - } + $items = DataChangeRecord::get()->filter('Created:LessThan', $this->pruneBefore); + $max = $items->max('ID'); + + $query = new SQLDelete('DataChangeRecord', '"ID" < \'' . $max . '\''); + $query->execute(); $job = new PruneChangesBeforeJob($this->priorTo);