diff --git a/compass/app/Console/Commands/TestTrip.php b/compass/app/Console/Commands/TestTrip.php new file mode 100644 index 0000000..55f84d1 --- /dev/null +++ b/compass/app/Console/Commands/TestTrip.php @@ -0,0 +1,21 @@ +where('write_token','=','test')->first(); + $loc = json_decode('{"properties":{"end":"2015-12-28T23:20:14Z","start":"2015-12-28T22:45:22Z","mode":"bicycle","distance":6439.4875686883,"end-coordinates":[-122.67617024493,45.549965919969],"start-coordinates":[-122.63860439893,45.522223161576],"duration":2092.7059409618,"type":"trip","timestamp":"2015-12-28T23:20:14Z"},"stopped_automatically":true,"type":"Feature","geometry":{"type":"Point","coordinates":[-122.67617024493,45.549965919969]}}', true); + $this->dispatch((new TripComplete($db->id, $loc))->onQueue('compass')); + } + +} diff --git a/compass/app/Console/Kernel.php b/compass/app/Console/Kernel.php index ad6e311..876ca5b 100644 --- a/compass/app/Console/Kernel.php +++ b/compass/app/Console/Kernel.php @@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel * @var array */ protected $commands = [ - // + 'App\Console\Commands\TestTrip', ]; /**