From b5b10b307282bf5cfe086a6a80bc08fb5b5350dd Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sat, 14 Jan 2017 05:01:35 +0300 Subject: [PATCH] Delay between requests even when user is not found. --- .../PointToolsBundle/Command/UpdateSubscriptionsCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php b/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php index dba2540..0f9ff8c 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Command/UpdateSubscriptionsCommand.php @@ -177,6 +177,8 @@ class UpdateSubscriptionsCommand extends ContainerAwareCommand { // Updating users subscribers foreach ($users as $user) { + usleep($this->apiDelay); + $this->logger->info('Processing @'.$user->getLogin()); try { @@ -215,8 +217,6 @@ class UpdateSubscriptionsCommand extends ContainerAwareCommand } $this->progress->advance(); - - usleep($this->apiDelay); } }