Browse Source

dispatch a job when a trip is complete

pull/5/head
Aaron Parecki 9 years ago
parent
commit
aa8038510e
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      compass/app/Http/Controllers/Api.php

+ 3
- 2
compass/app/Http/Controllers/Api.php View File

@ -8,6 +8,7 @@ use DB;
use Quartz;
use Log;
use DateTime, DateTimeZone;
use App\Jobs\TripComplete;
class Api extends BaseController
{
@ -121,8 +122,8 @@ class Api extends BaseController
if(array_key_exists('type', $loc['properties']) && $loc['properties']['type'] == 'trip') {
try {
$this->dispatch(new TripComplete($db->id, $loc));
$trips++;
} catch(Exception $e) {

Loading…
Cancel
Save