Browse Source

skip importing trips that are too short

pull/5/head
Aaron Parecki 7 years ago
parent
commit
6fd5ad2bf1
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      compass/app/Jobs/TripComplete.php

+ 5
- 0
compass/app/Jobs/TripComplete.php View File

@ -126,6 +126,11 @@ class TripComplete extends Job implements SelfHandling, ShouldQueue
$endDate->setTimeZone(new DateTimeZone($end->timezone));
}
if($endDate->format('U') - $startDate->format('U') < 15) {
Log::info("Skipping trip since it was too short");
return;
}
$params = [
'h' => 'entry',
'published' => $endDate->format('c'),

Loading…
Cancel
Save