grapper wip
This commit is contained in:
1 parent
944aa736b2
commit
adb15e701b
9 files changed
+95
-68
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Grapper;
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Console\Commands\Grapper\TxOdds\TxOdds;
|
||||
use App\Models\Supervisor;
|
||||
@@ -8,7 +8,7 @@ use App\Utilities\Notice;
|
||||
use App\Utilities\Supervisorctl;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class Grapper extends Command
|
||||
class NuhBash extends Command
|
||||
{
|
||||
public static $event = [];
|
||||
|
||||
@@ -26,32 +26,37 @@ class Grapper extends Command
|
||||
|
||||
public static $auth = '';
|
||||
|
||||
protected $signature = 'gra {process=help} {eventid=0} {--d} {--f} {--a} {--p} {--w}';
|
||||
protected $signature = 'nuh {process=help} {eventid=0} {--d} {--f} {--a} {--p} {--w}';
|
||||
|
||||
protected $description = 'Grapper';
|
||||
protected $description = 'NuhBash';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
self::$options = $this->options();
|
||||
|
||||
dd(self::$options);
|
||||
|
||||
self::$options['supervisor_id'] = $this->argument('process');
|
||||
self::$options['event_id'] = $this->argument('eventid');
|
||||
|
||||
if ($this->argument('process') == 'help') {
|
||||
$txt = PHP_EOL.'a gra process [id] eventid [id]'.PHP_EOL;
|
||||
$txt = 'List of parameters'.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL;
|
||||
$txt .= 'process [id] (required)'.PHP_EOL;
|
||||
$txt .= 'eventid [id] (optional)'.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL;
|
||||
$txt .= 'List of options'.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL;
|
||||
$txt .= '--d debug'.PHP_EOL;
|
||||
$txt .= '--f force update market'.PHP_EOL;
|
||||
$txt .= '--a reload all'.PHP_EOL;
|
||||
$txt .= '--w reload one week'.PHP_EOL;
|
||||
$txt .= '--p print odds'.PHP_EOL.PHP_EOL;
|
||||
$txt .= 'eventid'.PHP_EOL.PHP_EOL;
|
||||
$txt .= 'use "gra l" to show options'.PHP_EOL;
|
||||
Notice::note($txt, 'b', 1);
|
||||
} elseif ($this->argument('process') == 'l') {
|
||||
$txt = 'list of grapper processes';
|
||||
$txt .= Supervisor::list('gra');
|
||||
$txt .= '--p print odds'.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL;
|
||||
$txt .= 'List of supervisors'.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL;
|
||||
$tmp = Supervisor::all();
|
||||
foreach ($tmp as $value) {
|
||||
$txt .= $value->provider->name.' '.$value->id.' - '.$value->type.' '.$value->name.PHP_EOL;
|
||||
}
|
||||
Notice::note($txt, 'b', 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user