options(); self::$options['supervisor_id'] = $this->argument('process'); $queries = self::$options['q'] ?? 0; $show_supervisors = self::$options['z'] ?? 0; if ($this->argument('process') == 'help') { $txt = PHP_EOL; if (!$show_supervisors) { $txt .= 'Parameters' . PHP_EOL; $txt .= '-----------------------------------------------------------' . PHP_EOL; $txt .= 'process [id] (required)' . PHP_EOL; $txt .= '--id=matchid (optional) calling spezific id' . PHP_EOL; $txt .= '--fun=name (optional) [bkms, markets]' . PHP_EOL; $txt .= '--gid=groupid (optional) [bkms, groupid]' . PHP_EOL; $txt .= '--truncate (optional)' . PHP_EOL; $txt .= '-----------------------------------------------------------' . PHP_EOL . PHP_EOL; $txt .= 'Sofascore (67)' . PHP_EOL; $txt .= '-----------------------------------------------------------' . PHP_EOL; $txt .= '--fun=[1,2,3,4,5]' . PHP_EOL . chr(9) . '1) player/season' . PHP_EOL . chr(9) . '2) setting to local' . PHP_EOL . chr(9) . '3) grapper' . PHP_EOL . chr(9) . '4) create zip' . PHP_EOL . chr(9) . '5) mail folder' . PHP_EOL; $txt .= '--task=[id from sofa_score_tasks table]'; $txt .= '--restart=[0|1] delete archive and flusch DB for taks, start new'; $txt .= '-----------------------------------------------------------' . PHP_EOL . PHP_EOL; $txt .= 'Options' . PHP_EOL; $txt .= '-----------------------------------------------------------' . PHP_EOL; $txt .= '--a all by id' . PHP_EOL; $txt .= '--b block update (reload all for txodds)' . PHP_EOL; $txt .= '--d debug' . PHP_EOL; $txt .= '--e echo client data' . PHP_EOL; $txt .= '--f force (what ever in script)' . PHP_EOL; $txt .= '--ff force grapping (sofascore)' . PHP_EOL; $txt .= '--g by minor groups (tx)' . PHP_EOL; $txt .= '--t load today' . PHP_EOL; $txt .= '--m mail it' . PHP_EOL; $txt .= '--p use proxy' . PHP_EOL; $txt .= '--q print all queries' . PHP_EOL; $txt .= '--r read data from file ' . PHP_EOL; $txt .= '--s store data to file ' . PHP_EOL; $txt .= '--t load today' . PHP_EOL; $txt .= '--w laod this week (tx)' . PHP_EOL; $txt .= '--x generate supervisors' . PHP_EOL; $txt .= '--y load yesterday' . PHP_EOL; $txt .= '--z show supervisors tasks' . PHP_EOL; } $txt .= '-----------------------------------------------------------' . PHP_EOL . PHP_EOL; $txt .= 'Supervisors (--z)' . PHP_EOL; if ($show_supervisors) { $txt .= '-----------------------------------------------------------' . PHP_EOL; $tmp = Supervisor::orderBy('provider_id')->get(); foreach ($tmp as $value) { if ($value->sport_id) { $txt .= sprintf('% 3d', $value->id) . ' ' . $value->provider->name . ' - ' . $value->sport->name . ' ' . $value->name . PHP_EOL; } else { $txt .= sprintf('% 3d', $value->id) . ' ' . $value->provider->name . ' - All ' . $value->name . PHP_EOL; } } } Notice::note($txt, 'b', 1); } if ($queries) { DB::enableQueryLog(); } Supervisorctl::start(self::$options); switch (self::$options['provider_id']) { case 1: // TXODDS FICTURES AND ODDS TxOdds::switch(); break; case 2: Betsapi::switch(); break; case 3: // Kenia Magloo::switch(); break; case 4: // Nigeria Magloo::switch(); break; case 5: // LOGIFUTUR NIGERA Logifuture::switch(); break; case 6: // LOGIFUTUR COLOMBIA Logifuture::switch(); break; case 7: // SERVICE Services::switch(); break; case 8: // TXODDS MARKET WITH LAST CALL TxOdds::switch(); break; case 9: // BETICA Betica::switch(); break; case 10: // GOLDBET Goldbet::switch(); break; case 11: // DB MAPPER AutoMapper::switch(); break; case 12: // SOFASCORE Sofascore::switch(); break; default: Notice::note('Provider not defined', 'r', 1); break; } Supervisorctl::end(self::$options); if ($queries) { Notice::db(DB::getQueryLog()); } } }