src/OroCRM/Bundle/MagentoBundle/Provider/AbstractMagentoConnector.php 1 location
|
@@ 189-195 (lines=7) @@
|
186 |
|
// If connector has status use it's information for start date |
187 |
|
if ($status) { |
188 |
|
$data = $status->getData(); |
189 |
|
if (empty($data[AbstractInitialProcessor::SKIP_STATUS])) { |
190 |
|
if (!empty($data[self::LAST_SYNC_KEY])) { |
191 |
|
return new \DateTime($data[self::LAST_SYNC_KEY], new \DateTimeZone('UTC')); |
192 |
|
} |
193 |
|
|
194 |
|
return clone $status->getDate(); |
195 |
|
} |
196 |
|
} |
197 |
|
|
198 |
|
// If there is no status and LAST_SYNC_KEY is present in contexts use it |
src/OroCRM/Bundle/MagentoBundle/Provider/MagentoSyncProcessor.php 1 location
|
@@ 222-231 (lines=10) @@
|
219 |
|
protected function getSyncedTo(Integration $integration, $connector) |
220 |
|
{ |
221 |
|
$lastStatus = $this->getLastStatusForConnector($integration, $connector, Status::STATUS_COMPLETED); |
222 |
|
if ($lastStatus) { |
223 |
|
$statusData = $lastStatus->getData(); |
224 |
|
if (!empty($statusData[static::SYNCED_TO])) { |
225 |
|
return \DateTime::createFromFormat( |
226 |
|
\DateTime::ISO8601, |
227 |
|
$statusData[static::SYNCED_TO], |
228 |
|
new \DateTimeZone('UTC') |
229 |
|
); |
230 |
|
} |
231 |
|
} |
232 |
|
|
233 |
|
return false; |
234 |
|
} |