Resolve "CMB - Data migration for Carfix data" #1355

Closed
korina.cordero wants to merge 57 commits from 460-cmb-data-migration-for-carfix-data into 424-cmb-release
Showing only changes of commit ab11e8aee5 - Show all commits

View file

@ -215,7 +215,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
$rider_id = $rider->getID();
// cache rider location (default to hub)
// TODO: figure out longitude / latitude default
$this->rcache->addActiveRider($rider_id, 0, 0);
// $this->rcache->addActiveRider($rider_id, 0, 0);
// TODO: log rider logging in
@ -285,7 +285,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
$rider->setActive(false);
// remove from cache
$this->rcache->removeActiveRider($rider->getID());
// $this->rcache->removeActiveRider($rider->getID());
// remove rider from session
$this->session->setRider(null);
@ -318,6 +318,10 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
$this->em->flush();
// cache rider location (default to hub)
// TODO: figure out longitude / latitude default
$this->rcache->addActiveRider($rider_id, 0, 0);
// send mqtt event to put rider on map
// get rider coordinates from redis
$coord = $this->rider_tracker->getRiderLocation($rider->getID());
@ -367,6 +371,9 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
$this->em->flush();
// remove from cache
$this->rcache->removeActiveRider($rider->getID());
// send mqtt event to remove rider from map
$channel = 'rider/' . $rider->getID() . '/availability';
$payload = [