From 1305d77f3524729d6fddaeb8b187a43cb89efa4d Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sun, 28 Jan 2018 09:23:50 -0800 Subject: [PATCH] show current location timestamp in callback log --- compass/app/Jobs/NotifyOfNewLocations.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compass/app/Jobs/NotifyOfNewLocations.php b/compass/app/Jobs/NotifyOfNewLocations.php index 74b2d10..ff58fab 100644 --- a/compass/app/Jobs/NotifyOfNewLocations.php +++ b/compass/app/Jobs/NotifyOfNewLocations.php @@ -32,7 +32,11 @@ class NotifyOfNewLocations extends Job implements SelfHandling, ShouldQueue curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($this->_last_location)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); - Log::info("Notifying ".$url." with current location"); + $timestamp = ''; + if($this->_last_location) { + $timestamp = $this->_last_location['properties']['timestamp']; + } + Log::info("Notifying ".$url." with current location: ".$timestamp); } } }