Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
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
captainwong
douban-api-proxy
Commits
843a93fe
Commit
843a93fe
authored
Mar 24, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updater fix for slow servers
parent
fa360726
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
updater.py
cps/updater.py
+1
-1
web.py
cps/web.py
+4
-0
No files found.
cps/updater.py
View file @
843a93fe
...
...
@@ -51,7 +51,7 @@ class Updater(threading.Thread):
def
__init__
(
self
):
threading
.
Thread
.
__init__
(
self
)
self
.
status
=
0
self
.
status
=
-
1
self
.
updateIndex
=
None
def
get_current_version_info
(
self
):
...
...
cps/web.py
View file @
843a93fe
...
...
@@ -1192,16 +1192,20 @@ def get_updater_status():
}
status
[
'text'
]
=
text
# helper.updater_thread = helper.Updater()
updater_thread
.
status
=
0
updater_thread
.
start
()
status
[
'status'
]
=
updater_thread
.
get_update_status
()
elif
request
.
method
==
"GET"
:
try
:
status
[
'status'
]
=
updater_thread
.
get_update_status
()
if
status
[
'status'
]
==
-
1
:
status
[
'status'
]
=
7
except
AttributeError
:
# thread is not active, occours after restart on update
status
[
'status'
]
=
7
except
Exception
:
status
[
'status'
]
=
11
app
.
logger
.
error
(
status
[
'status'
])
return
json
.
dumps
(
status
)
...
...
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