Commit dd2e2339 authored by OGA server's avatar OGA server
Browse files

Bug corrections in API controller

parent 5c33757c
......@@ -146,6 +146,7 @@ class APIController extends Controller{
$hmm_header = implode('', array_slice(file($hmm_file_path), 0, 20));
$header_seq="";
$hmm_file_name='';
$seq="";
$bioseq="";
......@@ -204,8 +205,9 @@ class APIController extends Controller{
//command line for analyzeManage
//$mapProcess = new Process("nohup php ../artisan analyze:oga $this->uniqid > $mapErr 2>&1 &");
$mapProcess = new Process(["nohup","php","../artisan analyze:oga",$this->uniqid]);
$mapProcess = new Process(["nohup","php","../artisan","analyze:oga",$this->uniqid]);
$mapProcess->run();
$mapProcess->setTimeout(null);
if (!$mapProcess->isSuccessful())
{
throw new ProcessFailedException($mapProcess);
......@@ -226,7 +228,7 @@ class APIController extends Controller{
$qrycount = $dblog->prepare("select count(*) as nb from logs where IP=? and UNIX_TIMESTAMP(subdate)>?");
$qrycount-> execute(array($ip,$lim));
} catch (Exception $ex) {
die("Error in request on logs table (APIController): ".$e->getMessage());
die("Error in request on logs table (APIController): ".$ex->getMessage());
}
$row =$qrycount->fetchObject();
if($row->nb> config('wimg.lim_api_24h') ){return true;}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment