Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-core
Commits
c21e2893
Commit
c21e2893
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Improved startup and shutdown.
parent
f52dfa04
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.vscode/launch.json
+22
-5
22 additions, 5 deletions
.vscode/launch.json
run.sh
+27
-15
27 additions, 15 deletions
run.sh
with
49 additions
and
20 deletions
.vscode/launch.json
+
22
−
5
View file @
c21e2893
...
@@ -5,14 +5,34 @@
...
@@ -5,14 +5,34 @@
"version"
:
"0.2.0"
,
"version"
:
"0.2.0"
,
"configurations"
:
[
"configurations"
:
[
{
{
"name"
:
"Aura Engine
- Run
"
,
"name"
:
"
Start
Aura Engine"
,
"type"
:
"python"
,
"type"
:
"python"
,
"request"
:
"launch"
,
"request"
:
"launch"
,
"program"
:
"${workspaceFolder}/engine-core.py"
,
"program"
:
"${workspaceFolder}/engine-core.py"
,
"console"
:
"integratedTerminal"
"console"
:
"integratedTerminal"
},
},
{
{
"name"
:
"Aura Engine API - Run"
,
"name"
:
"Start Engine Core Only"
,
"type"
:
"python"
,
"request"
:
"launch"
,
"program"
:
"${workspaceFolder}/engine-core.py"
,
"args"
:
[
"--without-lqs"
],
"console"
:
"integratedTerminal"
},
{
"name"
:
"Start Engine LQS Only"
,
"type"
:
"python"
,
"request"
:
"launch"
,
"program"
:
"${workspaceFolder}/engine-core.py"
,
"args"
:
[
"--lqs-only"
],
"console"
:
"integratedTerminal"
},
{
"name"
:
"Start Engine API"
,
"type"
:
"python"
,
"type"
:
"python"
,
"request"
:
"launch"
,
"request"
:
"launch"
,
"stopOnEntry"
:
false
,
"stopOnEntry"
:
false
,
...
@@ -23,9 +43,6 @@
...
@@ -23,9 +43,6 @@
},
},
"args"
:
[
"args"
:
[
"run"
"run"
],
"debugOptions"
:
[
"RedirectOutput"
]
]
},
},
{
{
...
...
This diff is collapsed.
Click to expand it.
run.sh
+
27
−
15
View file @
c21e2893
#
/usr
/bin/bash
#
!
/bin/bash
mode
=
"engine"
mode
=
"engine"
debug
=
"--debug"
#debug="--debug --verbose"
if
[
-n
"
$1
"
]
;
then
if
[[
$*
=
~ ^
(
engine|core|lqs|api-dev|api
)
$
]]
;
then
if
[[
$1
=
~ ^
(
engine|lqs|api|api-prod
)
$
]]
;
then
mode
=
$1
mode
=
$1
fi
fi
fi
echo
"[ Run mode=
$mode
]"
echo
"[ Run mode=
$mode
]"
if
[
$mode
==
"engine"
]
;
then
/usr/bin/python3.7 aura.py
### Runs Engine Core & Liquidsoap ###
if
[[
$mode
==
"engine"
]]
;
then
/usr/bin/env python3.7 engine-core.py
fi
### Runs Engine Core only ###
if
[[
$mode
==
"core"
]]
;
then
/usr/bin/env python3.7 engine-core.py
--without-lqs
fi
fi
if
[
$mode
==
"lqs"
]
;
then
### Runs Liquidsoap only ###
(
cd
modules/liquidsoap/
&&
liquidsoap
$debug
./engine.liq
)
if
[[
$mode
==
"lqs"
]]
;
then
lqs
=
$(
/usr/bin/env python3.7 engine-core.py
--get-lqs-command
)
eval
"
$lqs
"
fi
fi
if
[
$mode
==
"api"
]
;
then
### Runs the API Server (Development) ###
if
[[
$mode
==
"api-dev"
]]
;
then
echo
"Building Web Applications"
echo
"Building Web Applications"
sh ./script/build-web.sh
sh ./script/build-web.sh
echo
"Starting API Server"
echo
"Starting API Server"
/usr/bin/python3.7 api.py
/usr/bin/
env
python3.7
engine-
api.py
fi
fi
if
[
$mode
==
"api-prod"
]
;
then
### Runs the API Server (Production) ###
if
[[
$mode
==
"api"
]]
;
then
echo
"Building Web Applications"
echo
"Building Web Applications"
sh ./script/build-web.sh
sh ./script/build-web.sh
echo
"Starting API Server"
echo
"Starting API Server"
gunicorn
-c
configuration/gunicorn.conf.py api:app
gunicorn
-c
configuration/gunicorn.conf.py
engine-
api:app
fi
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment