Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
agkyra
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
itminedu
agkyra
Commits
fcb933e6
Commit
fcb933e6
authored
10 years ago
by
Stavros Sachtouris
Committed by
Giorgos Korfiatis
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix calling launch_server from CLI script
parent
b1c5c138
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
agkyra/gui.py
+1
-2
1 addition, 2 deletions
agkyra/gui.py
agkyra/protocol.py
+1
-1
1 addition, 1 deletion
agkyra/protocol.py
agkyra/scripts/cli.py
+8
-6
8 additions, 6 deletions
agkyra/scripts/cli.py
with
10 additions
and
9 deletions
agkyra/gui.py
+
1
−
2
View file @
fcb933e6
...
@@ -82,8 +82,7 @@ class GUI(WebSocketBaseClient):
...
@@ -82,8 +82,7 @@ class GUI(WebSocketBaseClient):
def
run
():
def
run
():
"""
Prepare SessionHelper and GUI and run them in the proper order
"""
"""
Prepare SessionHelper and GUI and run them in the proper order
"""
LOG
.
info
(
'
Start SessionHelper session
'
)
LOG
.
info
(
'
Start SessionHelper session
'
)
subprocess
.
Popen
([
subprocess
.
Popen
([
'
agkyra-cli
'
,
'
launch_server
'
])
os
.
path
.
join
(
CURPATH
,
'
scripts/cli.py
'
),
'
launch_server
'
])
LOG
.
info
(
'
Client blocks until session is ready
'
)
LOG
.
info
(
'
Client blocks until session is ready
'
)
session
=
SessionHelper
().
wait_session_to_load
()
session
=
SessionHelper
().
wait_session_to_load
()
...
...
This diff is collapsed.
Click to expand it.
agkyra/protocol.py
+
1
−
1
View file @
fcb933e6
...
@@ -147,7 +147,7 @@ class WebSocketProtocol(WebSocket):
...
@@ -147,7 +147,7 @@ class WebSocketProtocol(WebSocket):
GUI: {
"
method
"
:
"
post
"
,
"
path
"
:
"
pause
"
}
GUI: {
"
method
"
:
"
post
"
,
"
path
"
:
"
pause
"
}
HELPER: {
"
OK
"
: 200,
"
action
"
:
"
post pause
"
} or error
HELPER: {
"
OK
"
: 200,
"
action
"
:
"
post pause
"
} or error
--
start
--
--
START
--
GUI: {
"
method
"
:
"
post
"
,
"
path
"
:
"
start
"
}
GUI: {
"
method
"
:
"
post
"
,
"
path
"
:
"
start
"
}
HELPER: {
"
OK
"
: 200,
"
action
"
:
"
post start
"
} or error
HELPER: {
"
OK
"
: 200,
"
action
"
:
"
post start
"
} or error
...
...
This diff is collapsed.
Click to expand it.
agkyra/scripts/cli.py
+
8
−
6
View file @
fcb933e6
...
@@ -40,18 +40,20 @@ LOGGER.setLevel(logging.DEBUG)
...
@@ -40,18 +40,20 @@ LOGGER.setLevel(logging.DEBUG)
def
main
():
def
main
():
from
agkyra.cli
import
AgkyraCLI
from
agkyra.cli
import
AgkyraCLI
from
sys
import
argv
from
sys
import
argv
AgkyraCLI
().
onecmd
(
'
'
.
join
(
argv
[
1
:]
or
[
'
help
'
,
]))
if
__name__
==
"
__main__
"
:
if
sys
.
argv
[
1
]
in
(
'
launch_server
'
,
):
if
sys
.
argv
[
1
]
in
(
'
launch_server
'
,
):
# This piece of code will stay here until the CLI can launch a server
# This piece of code will stay here until the CLI can launch a server
# by itself
# by itself
from
agkyra.protocol
import
SessionHelper
from
agkyra.protocol
import
SessionHelper
LOGGER
.
debug
(
'
Please s
tart the session helper
'
)
LOGGER
.
debug
(
'
S
tart the session helper
'
)
helper
=
SessionHelper
()
helper
=
SessionHelper
()
if
not
helper
.
load_active_session
():
if
not
helper
.
load_active_session
():
helper
.
create_session
()
helper
.
create_session
()
helper
.
server
.
serve_forever
()
helper
.
server
.
serve_forever
()
else
:
LOGGER
.
info
(
'
Another session is running, aborting
'
)
else
:
else
:
main
()
AgkyraCLI
().
onecmd
(
'
'
.
join
(
argv
[
1
:]
or
[
'
help
'
,
]))
if
__name__
==
"
__main__
"
:
main
()
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