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
265c4549
Commit
265c4549
authored
10 years ago
by
Stavros Sachtouris
Committed by
Giorgos Korfiatis
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Stop caching nwjs sessions
Cache is not useful in the context of the present application.
parent
86b7ee0a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
agkyra/agkyra/gui.py
+6
-8
6 additions, 8 deletions
agkyra/agkyra/gui.py
agkyra/agkyra/gui/package.json
+1
-1
1 addition, 1 deletion
agkyra/agkyra/gui/package.json
with
7 additions
and
9 deletions
agkyra/agkyra/gui.py
+
6
−
8
View file @
265c4549
...
...
@@ -22,26 +22,28 @@ from ws4py.client import WebSocketBaseClient
from
tempfile
import
NamedTemporaryFile
import
subprocess
import
json
from
os.path
import
abspath
,
join
from
os.path
import
abspath
from
threading
import
Thread
from
hashlib
import
sha1
import
os
import
logging
CURPATH
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
LOG
=
logging
.
getLogger
(
__name__
)
class
GUI
(
WebSocketBaseClient
):
"""
Launch the GUI when the helper server is ready
"""
def
__init__
(
self
,
addr
,
gui_id
):
def
__init__
(
self
,
addr
,
gui_id
,
**
kwargs
):
"""
Initialize the GUI Launcher
"""
super
(
GUI
,
self
).
__init__
(
addr
)
self
.
addr
=
addr
self
.
gui_id
=
gui_id
self
.
start
=
self
.
connect
self
.
nw
=
kwargs
.
get
(
'
nw
'
,
os
.
path
.
join
(
os
.
path
.
join
(
CURPATH
,
'
nwjs
'
),
'
nw
'
))
self
.
gui_code
=
kwargs
.
get
(
'
gui_code
'
,
os
.
path
.
join
(
CURPATH
,
'
gui.nw
'
))
def
run_gui
(
self
):
"""
Launch the GUI and keep it running, clean up afterwards.
...
...
@@ -55,11 +57,7 @@ class GUI(WebSocketBaseClient):
json
.
dump
(
dict
(
gui_id
=
self
.
gui_id
,
address
=
self
.
addr
),
fp
)
# subprocess.call blocks the execution
LOG
.
debug
(
'
RUN: %s
'
%
(
fp
.
name
))
subprocess
.
call
([
os
.
path
.
join
(
os
.
path
.
join
(
CURPATH
,
'
nwjs
'
),
'
nw
'
),
os
.
path
.
join
(
CURPATH
,
'
gui.nw
'
),
fp
.
name
,
'
--data-path
'
,
abspath
(
'
~/.agkyra
'
)])
subprocess
.
call
([
self
.
nw
,
self
.
gui_code
,
fp
.
name
])
LOG
.
debug
(
'
GUI process closed, remove temp file
'
)
os
.
remove
(
fp
.
name
)
...
...
This diff is collapsed.
Click to expand it.
agkyra/agkyra/gui/package.json
+
1
−
1
View file @
265c4549
...
...
@@ -13,5 +13,5 @@
"web"
:
"http://www.synnefo.org"
}],
"licences"
:
[{
"type"
:
"GPLv3"
}],
"
chromium-args"
:
"--incognito"
"
page-cache"
:
false
}
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