-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Damjan Znidarsic
authored and
Damjan Znidarsic
committed
Jul 18, 2015
1 parent
4fc10dc
commit 5d529f3
Showing
3 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
include __DIR__.'/../vendor/autoload.php'; | ||
|
||
// connect to database 0 on 127.0.0.1 | ||
$redis = new Predis\Client([ | ||
'host' => 'localhost', | ||
'port' => '6379', | ||
'database' => 0, | ||
]); | ||
|
||
// Instantiate a new client within 'users' namespace | ||
$client = new \SidekiqJob\Client($redis, 'users'); | ||
|
||
// push a job with three arguments - args array needs to be sequential (not associative) | ||
$args = [ | ||
['url' => 'http://i.imgur.com/hlAsa4k.jpg'], | ||
true, | ||
70 | ||
]; | ||
|
||
$id = $client->push('ProcessImage', $args); | ||
|
||
var_dump(sprintf('Pushed job with id %s', $id)); |
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