Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ocean_atlas
OGA
Commits
dd2e2339
Commit
dd2e2339
authored
Nov 22, 2022
by
OGA server
Browse files
Bug corrections in API controller
parent
5c33757c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/API/APIController.php
View file @
dd2e2339
...
...
@@ -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): "
.
$e
x
->
getMessage
());
}
$row
=
$qrycount
->
fetchObject
();
if
(
$row
->
nb
>
config
(
'wimg.lim_api_24h'
)
){
return
true
;}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment