Browse Source

log notify response

main
Aaron Parecki 2 years ago
parent
commit
24538f78d4
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      compass/app/Jobs/NotifyOfNewLocations.php

+ 2
- 1
compass/app/Jobs/NotifyOfNewLocations.php View File

@ -39,12 +39,13 @@ class NotifyOfNewLocations extends Job implements SelfHandling, ShouldQueue
]); ]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $location); curl_setopt($ch, CURLOPT_POSTFIELDS, $location);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
$response = curl_exec($ch);
$timestamp = ''; $timestamp = '';
if($db->last_location) { if($db->last_location) {
$timestamp = json_decode($db->last_location)->properties->timestamp; $timestamp = json_decode($db->last_location)->properties->timestamp;
} }
Log::info("Notifying ".$url." with current location: ".$timestamp); Log::info("Notifying ".$url." with current location: ".$timestamp);
Log::info($response);
} }
} }
} }

Loading…
Cancel
Save