Skip to content

Commit

Permalink
Merge pull request #175 from shakaran/patch-1
Browse files Browse the repository at this point in the history
Use BatchJobStatus enum constants in the AddCompleteCampaignsUsingBatchJob example.
  • Loading branch information
fiboknacky authored Oct 11, 2016
2 parents 06dcb47 + 2422a6b commit f4bc780
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ public static function runExample(
$batchJob->getStatus());

$pollAttempts++;
if ($batchJob->getStatus() !== 'ACTIVE' &&
$batchJob->getStatus() !== 'AWAITING_FILE' &&
$batchJob->getStatus() !== 'CANCELING') {
if ($batchJob->getStatus() !== BatchJobStatus::ACTIVE &&
$batchJob->getStatus() !== BatchJobStatus::AWAITING_FILE &&
$batchJob->getStatus() !== BatchJobStatus::CANCELING) {
$isPending = false;
}
} while ($isPending && $pollAttempts <= self::MAX_POLL_ATTEMPTS);
Expand Down

0 comments on commit f4bc780

Please sign in to comment.