Created
March 12, 2014 20:31
-
-
Save apinstein/9515695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sc = ShellCommand::create() | |
->addCommand("echo HI") | |
; | |
$j = new RemoteShellCommandJob($sc); | |
$j->webhookThen( | |
array('MyPromiseHandler', 'success'), | |
array('MyPromiseHandler', 'error'), | |
array('MyPromiseHandler', 'notify') | |
); | |
$q = VirtualTourApp::getJQStore(); | |
$q->enqueue($j, array('queueName' => 'foo')); | |
// => the enqueueing code exits here, UX say "Queued for processing..." | |
// NOW, some out-of-band process handles the request (local or remote worker for instance), | |
// and when it's done, the remote system will ping/webhook a generic webhook endpoint | |
// which will resolve/reject/progress the promise associated with this job... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment