wip countries
This commit is contained in:
1 parent
641b362752
commit
1b9a65b25a
23 files changed
+127755
-27137
No files matched your search
@@ -6,13 +6,14 @@ use App\Console\Commands\Grapper\TxSwitch;
|
||||
use App\Models\Supervisor;
|
||||
use App\Utilities\Notice;
|
||||
use App\Utilities\Supervisorctl;
|
||||
use DB;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class NuhBash extends Command
|
||||
{
|
||||
public static $options = [];
|
||||
|
||||
protected $signature = 'nuh {process=help} {eventid=0} {--d} {--f} {--a} {--p} {--w} {--s} {--l}';
|
||||
protected $signature = 'nuh {process=help} {eventid=0} {--d} {--f} {--a} {--w} {--p} {--s} {--r} {--b}';
|
||||
|
||||
protected $description = 'NuhBash';
|
||||
|
||||
@@ -22,6 +23,7 @@ class NuhBash extends Command
|
||||
|
||||
self::$options['supervisor_id'] = $this->argument('process');
|
||||
self::$options['event_id'] = $this->argument('eventid');
|
||||
$queries = self::$options['m'] ?? 0;
|
||||
|
||||
if ($this->argument('process') == 'help') {
|
||||
$txt = PHP_EOL;
|
||||
@@ -33,12 +35,14 @@ class NuhBash extends Command
|
||||
$txt .= 'List of options'.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL;
|
||||
$txt .= '--d debug'.PHP_EOL;
|
||||
$txt .= '--m debug queries'.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;
|
||||
$txt .= '--s store grapped file '.PHP_EOL;
|
||||
$txt .= '--l load latest grapped file '.PHP_EOL;
|
||||
$txt .= '--s store data to file '.PHP_EOL;
|
||||
$txt .= '--r read data from file '.PHP_EOL;
|
||||
$txt .= '--b break loop after one '.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL.PHP_EOL;
|
||||
$txt .= 'List of supervisors'.PHP_EOL;
|
||||
$txt .= '----------------------------------------------'.PHP_EOL;
|
||||
@@ -49,6 +53,10 @@ class NuhBash extends Command
|
||||
Notice::note($txt, 'b', 1);
|
||||
}
|
||||
|
||||
if ($queries) {
|
||||
DB::enableQueryLog();
|
||||
}
|
||||
|
||||
Supervisorctl::start(self::$options);
|
||||
|
||||
switch (self::$options['type']) {
|
||||
@@ -74,5 +82,10 @@ class NuhBash extends Command
|
||||
}
|
||||
|
||||
Supervisorctl::end(self::$options);
|
||||
|
||||
if ($queries) {
|
||||
Notice::db(DB::getQueryLog());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user