/** * @return void * @version 2015062901 * @since 2015062901 */ public function pollForBlacklistedRecipients() { $usAccounts = $this->accountDAO->getAccountByLocation(TxttoolsAccount::$US_LOCATION); foreach ($usAccounts as $account) { try { $phoneNumbers = $this->getAllPhoneNumbers(); $blacklistedNumbers = $this->xmlController->getOptOutStatusUpdates($phoneNumbers, $account); $this->syncDbWithResponse($blacklistedNumbers, $account); } catch (Exception $ex) { // XML request might throw exceptions in case of some errors // Ignored file_put_contents('C:\\moodle.log', time() . ': cron blacklist poll failed for account (' . $account->getUsername() . '@' . $account->getUrl() . ') -> ' . $ex->getMessage(), FILE_APPEND); } } }