set base_url in provider table
This commit is contained in:
1 parent
5895f90b5b
commit
f68fdc1dec
10 files changed
+77
-111
No files matched your search
@@ -25,7 +25,19 @@ class Supervisorctl
|
||||
|
||||
self::$code = $options['supervisor_id'];
|
||||
|
||||
$supervisor = Supervisor::with('sport')->with('provider')->find(self::$code);
|
||||
$supervisor = Supervisor::with('sport')->with('provider')->find(self::$code)->toArray();
|
||||
|
||||
if (isset($supervisor['sport']['name'])) {
|
||||
$supervisor['sport'] = $supervisor['sport']['name'];
|
||||
}
|
||||
|
||||
if ($supervisor['provider']) {
|
||||
$supervisor['provider_id'] = $supervisor['provider']['id'];
|
||||
$supervisor['base_url'] = $supervisor['provider']['base_url'];
|
||||
$supervisor['provider'] = $supervisor['provider']['name'];
|
||||
}
|
||||
|
||||
$options = array_merge($options, $supervisor);
|
||||
|
||||
if ($maker) {
|
||||
SupervisorMaker::run($supervisor);
|
||||
@@ -36,9 +48,6 @@ class Supervisorctl
|
||||
Notice::note('supervisor start '.self::$code, 'g');
|
||||
}
|
||||
|
||||
$tmp = $supervisor->toArray();
|
||||
unset($tmp['id']);
|
||||
$options = array_merge($options, $tmp);
|
||||
if ($proxy) {
|
||||
$options['proxy'] = 'https://prox2.nuhodds.com/proxy.php';
|
||||
}
|
||||
@@ -48,19 +57,38 @@ class Supervisorctl
|
||||
sleep($options['sleep']);
|
||||
} else {
|
||||
if ($options['is_supervisor']) {
|
||||
Notice::note('cron process timings set in crontab', 'b');
|
||||
Notice::note('cron process', 'b');
|
||||
} else {
|
||||
Notice::note('in production process sleeps for '.$options['sleep'].'sec', 'b');
|
||||
Notice::note('production sleeps '.$options['sleep'].'sec', 'b');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch ($options['provider_id']) {
|
||||
case 3:
|
||||
// MAGLOO KENIA
|
||||
$options['bookmaker_id'] = 16;
|
||||
break;
|
||||
case 4:
|
||||
// MAGLOO NIGERIA
|
||||
$options['bookmaker_id'] = 10;
|
||||
break;
|
||||
case 5:
|
||||
// LOGIFUTURE NIGERA
|
||||
$options['bookmaker_id'] = 35;
|
||||
break;
|
||||
case 6:
|
||||
// LOGIFUTURE COLOMBIA
|
||||
$options['bookmaker_id'] = 36;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (! $options['is_active'] && ! $runanyway) {
|
||||
Notice::note('Process disabled, sleeps 2 min then exit', 'r');
|
||||
sleep(120);
|
||||
exit;
|
||||
}
|
||||
|
||||
} else {
|
||||
Notice::note('unknown supervisor: '.self::$code, 'r', 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user