Skip to content

Commit

Permalink
feat: make client constructor method public. pass job id to the job's…
Browse files Browse the repository at this point in the history
… run callback.
  • Loading branch information
lots0logs committed Jan 20, 2022
1 parent 6f88837 commit 964e99e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Client extends Base {

public string $name;

protected function __construct( string $name = 'default', array $redis_nodes = [] ) {
public function __construct( string $name = 'default', array $redis_nodes = [] ) {
$this->name = $name;

if ( ! $redis_nodes ) {
Expand Down
2 changes: 1 addition & 1 deletion src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function _doJob( $job ) {
case 0:
// Child Process
try {
call_user_func( $job->callbacks['run'], $job->data );
call_user_func( $job->callbacks['run'], $job->id, $job->data );
} catch ( \Exception $err ) {
et_error( $err->getMessage() );
die( 1 );
Expand Down

0 comments on commit 964e99e

Please sign in to comment.