Skip to content

Commit

Permalink
Fix print messages
Browse files Browse the repository at this point in the history
Without fixing, messages look like:
I: (%s) simulating a crash4FD0-BC02
  • Loading branch information
gitomato committed Jun 2, 2016
1 parent 327a7bc commit be3a622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/PHP/spworker.php
Expand Up @@ -28,10 +28,10 @@

// Simulate various problems, after a few cycles
if ($cycles > 3 && rand(0, 3) == 0) {
echo "I: (%s) simulating a crash", $identity, PHP_EOL;
printf ("I: (%s) simulating a crash%s", $identity, PHP_EOL);
break;
} elseif ($cycles > 3 && rand(0, 3) == 0) {
echo "I: (%s) simulating CPU overload", $identity, PHP_EOL;
printf ("I: (%s) simulating CPU overload%s", $identity, PHP_EOL);
sleep(5);
}
printf ("I: (%s) normal reply - %s%s", $identity, $zmsg->body(), PHP_EOL);
Expand Down

0 comments on commit be3a622

Please sign in to comment.