add --f oprionto run grapper also when disabled

This commit is contained in:
salam committed 2026-01-14 18:02:06 +01:00
1 parent 6978f8095c
commit 66e064257a
3 files changed
+8 -6

No files matched your search

@@ -18,14 +18,14 @@ class BookmakerOffer
public static function init()
{
if (Nuh::$options['f'] == 'bkms') {
if (Nuh::$options['fn'] == 'bkms') {
self::$collector = [];
}
}
public static function collect($bookmaker_id, $sport_id)
{
if (Nuh::$options['f'] == 'bkms') {
if (Nuh::$options['fn'] == 'bkms') {
if (! isset(self::$collector[$sport_id])) {
self::$collector[$sport_id] = [];
}
@@ -38,7 +38,7 @@ class BookmakerOffer
public static function finalize()
{
if (Nuh::$options['f'] == 'bkms') {
if (Nuh::$options['fn'] == 'bkms') {
foreach (self::$collector as $sport_id => $bookmaker_ids) {
BookmakerSport::where('provider_id', Nuh::$options['provider_id'])
->where('sport_id', (int) $sport_id)
+3 -2
View File
@@ -24,7 +24,7 @@ class Nuh extends Command
public static $collector = [];
protected $signature = 'nuh {process=help} {--id=0} {--f=} {--p} {--d} {--x} {--t} {--w} {--g} {--a} {--r} {--s} {--t} {--q}';
protected $signature = 'nuh {process=help} {--id=0} {--fn=} {--p} {--d} {--x} {--t} {--w} {--g} {--a} {--r} {--s} {--t} {--q} {--f}';
public function handle()
{
@@ -39,12 +39,13 @@ class Nuh extends Command
$txt .= '----------------------------------------------'.PHP_EOL;
$txt .= 'process [id] (required)'.PHP_EOL;
$txt .= '--id=matchid (optional) calling spezific id'.PHP_EOL;
$txt .= '--f=name (optional) [bkms, markets]'.PHP_EOL;
$txt .= '--fn=name (optional) [bkms, markets]'.PHP_EOL;
$txt .= '----------------------------------------------'.PHP_EOL.PHP_EOL;
$txt .= 'Options'.PHP_EOL;
$txt .= '----------------------------------------------'.PHP_EOL;
$txt .= '--p use proxy'.PHP_EOL;
$txt .= '--d debug'.PHP_EOL;
$txt .= '--f run also when odd'.PHP_EOL;
$txt .= '--x generate supervisors'.PHP_EOL;
$txt .= '--t load today'.PHP_EOL;
$txt .= '--a all by id'.PHP_EOL;
+2 -1
View File
@@ -16,6 +16,7 @@ class Supervisorctl
$debug = $options['d'] ?? 0;
$proxy = $options['p'] ?? 0;
$maker = $options['x'] ?? 0;
$runanyway = $options['f'] ?? 0;
// sleep for 0,5 seconds
usleep(500000);
@@ -54,7 +55,7 @@ class Supervisorctl
}
}
if (! $options['is_active']) {
if (! $options['is_active'] && ! $runanyway) {
Notice::note('Process disabled, sleeps 2 min then exit', 'r');
sleep(120);
exit;