Skip to content

Commit

Permalink
CRM-6548: Magento Initial sync starts every week
Browse files Browse the repository at this point in the history
  • Loading branch information
mccar committed Oct 31, 2016
1 parent 0a3374d commit eba822d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Oro/Bundle/IntegrationBundle/Command/CleanupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,21 @@ protected function prepareExcludes()
(
SELECT connector, MAX(`date`) AS minDate
FROM %s AS b
WHERE b.code = %s
GROUP BY connector
) b ON a.connector = b.connector AND
a.date = b.minDate
WHERE a.code = %s
GROUP BY
a.connector
SQL;
$selectQuery = sprintf($selectQuery, $tableName, $tableName);
$selectQuery = sprintf(
$selectQuery,
$tableName,
$tableName,
Status::STATUS_COMPLETED,
Status::STATUS_COMPLETED
);
$data = $connection->fetchAll($selectQuery);
$excludes = array_map(
function ($item) {
Expand Down

0 comments on commit eba822d

Please sign in to comment.