-
Notifications
You must be signed in to change notification settings - Fork 8
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
dp-ifacesoft
committed
Sep 30, 2020
1 parent
d87cf66
commit 61ae499
Showing
3 changed files
with
52 additions
and
0 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,32 @@ | ||
<?php | ||
|
||
namespace Ice\Action; | ||
|
||
use Ice\Core\Action; | ||
use Ice\DataProvider\Cli; | ||
use Ice\DataProvider\Redis; | ||
use Ice\DataProvider\Request; | ||
use Ice\DataProvider\Router; | ||
|
||
class Worker_Status extends Action | ||
{ | ||
/** | ||
* @return array | ||
*/ | ||
protected static function config() | ||
{ | ||
$config = parent::config(); | ||
|
||
$config['input']['worker_key'] = ['providers' => ['default', Router::class, Cli::class]]; | ||
$config['input']['action'] = ['providers' => ['default', Request::class, Cli::class]]; | ||
|
||
return $config; | ||
} | ||
|
||
public function run(array $input) | ||
{ | ||
$provider = Redis::getInstance('default', $input['action']); | ||
|
||
return $provider->hGet($input['worker_key']); | ||
} | ||
} |
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