Skip to content

Instantly share code, notes, and snippets.

@hjr3
Created August 20, 2011 21:38
Show Gist options
  • Save hjr3/1159700 to your computer and use it in GitHub Desktop.
Save hjr3/1159700 to your computer and use it in GitHub Desktop.
pecl/gearman worker exception
<?php
$gmw = new GearmanWorker();
$gmw->addServer();
$gmw->addFunction('test', function(GearmanJob $job) {
throw new Exception('Boom');
});
while(1) $gmw->work();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment