0, DateTimeFormat::utc('now - 1 month'), DateTimeFormat::utc('now - 1 week')]);
$ids = self::getContactsToUpdate($condition, [], $limit);
Logger::info('Fetched federated user contacts', ['count' => count($ids)]);
0, DateTimeFormat::utc('now - 1 month'), DateTimeFormat::utc('now - 1 week')]);
$ids = self::getContactsToUpdate($condition, [], $limit);
Logger::info('Fetched federated user contacts', ['count' => count($ids)]);
foreach ($conditions as $contact_condition) {
$condition = DBA::mergeConditions($base_condition,
foreach ($conditions as $contact_condition) {
$condition = DBA::mergeConditions($base_condition,
DateTimeFormat::utc('now - 1 month'), DateTimeFormat::utc('now - 1 week')]);
$ids = self::getContactsToUpdate($condition, $ids, $limit);
Logger::info('Fetched interacting federated contacts', ['count' => count($ids), 'condition' => $contact_condition]);
DateTimeFormat::utc('now - 1 month'), DateTimeFormat::utc('now - 1 week')]);
$ids = self::getContactsToUpdate($condition, $ids, $limit);
Logger::info('Fetched interacting federated contacts', ['count' => count($ids), 'condition' => $contact_condition]);
// Add every contact (mostly failed ones) that hadn't been updated for six months
// and every non failed contact that hadn't been updated for a month
$condition = DBA::mergeConditions($base_condition,
// Add every contact (mostly failed ones) that hadn't been updated for six months
// and every non failed contact that hadn't been updated for a month
$condition = DBA::mergeConditions($base_condition,
DateTimeFormat::utc('now - 6 month'), DateTimeFormat::utc('now - 1 month')]);
$previous = count($ids);
$ids = self::getContactsToUpdate($condition, $ids, $limit - $previous);
DateTimeFormat::utc('now - 6 month'), DateTimeFormat::utc('now - 1 month')]);
$previous = count($ids);
$ids = self::getContactsToUpdate($condition, $ids, $limit - $previous);