Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
66787b5b
Commit
66787b5b
authored
Jun 03, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改volume缓存
parent
98027df8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
utils.py
coco/httpd/utils.py
+4
-0
ws.py
coco/httpd/ws.py
+2
-1
No files found.
coco/httpd/utils.py
View file @
66787b5b
...
...
@@ -10,3 +10,7 @@ def get_cached_volume(sid):
def
set_cache_volume
(
sid
,
volume
):
__volumes_cached
[
sid
]
=
volume
def
remove_cache_volume
(
sid
):
__volumes_cached
.
pop
(
sid
,
None
)
coco/httpd/ws.py
View file @
66787b5b
...
...
@@ -11,7 +11,7 @@ from ..proxy import ProxyServer
from
..utils
import
get_logger
from
..service
import
app_service
from
.base
import
BaseNamespace
from
.utils
import
get_cached_volume
from
.utils
import
get_cached_volume
,
remove_cache_volume
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
))
logger
=
get_logger
(
__file__
)
...
...
@@ -205,3 +205,4 @@ class ElfinderNamespace(BaseNamespace):
sftp
=
get_cached_volume
(
request
.
sid
)
if
sftp
:
sftp
.
close
()
remove_cache_volume
(
request
.
sid
)
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