update urls for ztm gdansk

This commit is contained in:
Kacper Donat 2020-01-02 20:45:28 +01:00
parent 2d1253ec82
commit c99858fbe3
3 changed files with 11 additions and 7 deletions

View File

@ -18,11 +18,13 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ZtmGdanskDataUpdateSubscriber implements EventSubscriberInterface class ZtmGdanskDataUpdateSubscriber implements EventSubscriberInterface
{ {
const OPERATORS_URL = "http://91.244.248.19/dataset/c24aa637-3619-4dc2-a171-a23eec8f2172/resource/8b3aa347-3bb7-4c58-9113-d47458ec1fc3/download/agency.json"; const BASE_URL = 'https://ckan.multimediagdansk.pl/dataset/c24aa637-3619-4dc2-a171-a23eec8f2172/resource';
const LINES_URL = "http://91.244.248.19/dataset/c24aa637-3619-4dc2-a171-a23eec8f2172/resource/4128329f-5adb-4082-b326-6e1aea7caddf/download/routes.json";
const STOPS_URL = "http://91.244.248.19/dataset/c24aa637-3619-4dc2-a171-a23eec8f2172/resource/cd4c08b5-460e-40db-b920-ab9fc93c1a92/download/stops.json"; const OPERATORS_URL = self::BASE_URL."/dff5f71f-0134-4ef3-8116-73c1a8e929a5/download/agencies.json";
const TRACKS_URL = "http://91.244.248.19/dataset/c24aa637-3619-4dc2-a171-a23eec8f2172/resource/33618472-342c-4a4a-ba88-a911ec0ad5a7/download/trips.json"; const LINES_URL = self::BASE_URL."/22313c56-5acf-41c7-a5fd-dc5dc72b3851/download/routes.json";
const STOPS_IN_TRACKS_URL = "http://91.244.248.19/dataset/c24aa637-3619-4dc2-a171-a23eec8f2172/resource/0f2de200-e78b-4183-ae0d-071d7f07fc3f/download/stopsintrips.json"; const STOPS_URL = self::BASE_URL."/4c4025f0-01bf-41f7-a39f-d156d201b82b/download/stops.json";
const TRACKS_URL = self::BASE_URL."/b15bb11c-7e06-4685-964e-3db7775f912f/download/trips.json";
const STOPS_IN_TRACKS_URL = self::BASE_URL."/3115d29d-b763-4af5-93f6-763b835967d6/download/stopsintrips.json";
private $em; private $em;
private $ids; private $ids;
@ -142,6 +144,8 @@ class ZtmGdanskDataUpdateSubscriber implements EventSubscriberInterface
public function getTracks(ProviderEntity $provider) public function getTracks(ProviderEntity $provider)
{ {
ini_set('memory_limit','2G');
$this->logger->info('Obtaining tracks from ZTM Gdańsk'); $this->logger->info('Obtaining tracks from ZTM Gdańsk');
$tracks = file_get_contents(self::TRACKS_URL); $tracks = file_get_contents(self::TRACKS_URL);

View File

@ -15,7 +15,7 @@ use Kadet\Functional\Transforms as t;
class ZtmGdanskDepartureRepository implements DepartureRepository class ZtmGdanskDepartureRepository implements DepartureRepository
{ {
const ESTIMATES_URL = 'http://87.98.237.99:88/delays'; const ESTIMATES_URL = 'http://ckan2.multimediagdansk.pl/delays';
/** @var LineRepository */ /** @var LineRepository */
private $lines; private $lines;

View File

@ -15,7 +15,7 @@ use Tightenco\Collect\Support\Collection;
class ZtmGdanskMessageRepository implements MessageRepository class ZtmGdanskMessageRepository implements MessageRepository
{ {
const MESSAGES_URL = "http://87.98.237.99:88/displayMessages"; const MESSAGES_URL = "http://ckan2.multimediagdansk.pl/displayMessages";
private $cache; private $cache;
private $classifier; private $classifier;