Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
V
VISPA web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
84
Issues
84
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3pia
VISPA
VISPA web
Commits
3d54c114
Commit
3d54c114
authored
Nov 19, 2018
by
Benjamin Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workspace: added RPyC 4 compatibility
parent
8d94b601
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
vispa/workspace.py
vispa/workspace.py
+8
-4
vispa/workspace_loader.py
vispa/workspace_loader.py
+4
-3
No files found.
vispa/workspace.py
View file @
3d54c114
...
...
@@ -26,10 +26,14 @@ from vispa.models.workspace import Workspace
import
cherrypy
import
paramiko
import
rpyc.core.stream
from
rpyc.version
import
version
as
rpyc_version
import
vispa.remote
import
types
logger
=
logging
.
getLogger
(
__name__
)
if
rpyc_version
[
0
]
>=
4
:
from
rpyc.lib
import
Timeout
RPYC_COMPRESSION
=
False
_remote_files
=
[]
...
...
@@ -120,9 +124,6 @@ add_package_files(rpyc)
class
LoggingService
(
rpyc
.
Service
):
def
__init__
(
self
,
conn
):
rpyc
.
Service
.
__init__
(
self
,
conn
)
def
exposed_log
(
self
,
name
,
level
,
msg
):
logging
.
getLogger
(
name
).
log
(
level
,
msg
)
...
...
@@ -284,6 +285,8 @@ class SSHConnectionImpl(object):
raise
NotImplementedError
def
poll
(
self
,
timeout
):
if
rpyc_version
[
0
]
>=
4
:
timeout
=
Timeout
(
timeout
).
timeleft
()
return
self
.
_in_buffer_event
.
wait
(
timeout
)
def
__init__
(
self
,
command
,
address
,
...
...
@@ -636,7 +639,8 @@ class Connection(object):
# send
logger
.
info
(
"connect rpyc"
)
channel
=
rpyc
.
Channel
(
self
.
_connection
.
stream
(),
False
)
self
.
__rpyc
=
rpyc
.
Connection
(
LoggingService
,
channel
,
{
"allow_public_attrs"
:
True
})
service
=
LoggingService
()
if
rpyc_version
[
0
]
>=
4
else
LoggingService
self
.
__rpyc
=
rpyc
.
Connection
(
service
,
channel
,
{
"allow_public_attrs"
:
True
})
logger
.
info
(
"connected rpyc"
)
self
.
_connection
.
print_stderr
()
...
...
vispa/workspace_loader.py
View file @
3d54c114
...
...
@@ -23,7 +23,7 @@ logging.basicConfig(
format
=
"%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)
logger
=
logging
.
getLogger
(
"vispa.workspace-loader"
)
# use provided loglevel
# use provided loglevel
try
:
loglevel
=
int
(
sys
.
stdin
.
readline
())
except
:
...
...
@@ -194,9 +194,10 @@ def main_loop(fin, fout):
# connect the rpyc server to fifo
stream
=
rpyc
.
PipeStream
(
fin
,
fout
)
channel
=
rpyc
.
Channel
(
stream
,
False
)
service
=
Service
()
if
rpyc
.
version
.
version
[
0
]
>=
4
else
Service
vispa
.
remote
.
connection
=
rpyc
.
Connection
(
S
ervice
,
channel
,
{
'allow_public_attrs'
:
True
,
'allow_setattr'
:
True
})
s
ervice
,
channel
,
{
'allow_public_attrs'
:
True
,
'allow_setattr'
:
True
,
'timeout'
:
300
})
vispa
.
remote
.
log
=
vispa
.
remote
.
connection
.
root
.
log
vispa
.
remote
.
send
=
vispa
.
remote
.
connection
.
root
.
send
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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