Update Updater
Bugfix author in opds-feed
This commit is contained in:
parent
c1818e8f36
commit
cc7dcfb35a
7
cps/helper.py
Executable file → Normal file
7
cps/helper.py
Executable file → Normal file
@ -399,15 +399,12 @@ class Updater(threading.Thread):
|
||||
z.extractall(tmp_dir)
|
||||
self.status = 4
|
||||
self.update_source(os.path.join(tmp_dir, os.path.splitext(fname)[0]), ub.config.get_main_dir)
|
||||
self.status = 5
|
||||
db.session.close()
|
||||
db.engine.dispose()
|
||||
ub.session.close()
|
||||
ub.engine.dispose()
|
||||
self.status = 6
|
||||
time.sleep(2)
|
||||
server.Server.setRestartTyp(True)
|
||||
server.Server.stopServer()
|
||||
self.status = 7
|
||||
time.sleep(2)
|
||||
except requests.exceptions.HTTPError as ex:
|
||||
logging.getLogger('cps.web').info( u'HTTP Error' + ' ' + str(ex))
|
||||
self.status = 8
|
||||
|
@ -43,11 +43,12 @@
|
||||
<title>{{entry.title}}</title>
|
||||
<id>{{entry.uuid}}</id>
|
||||
<updated>{{entry.atom_timestamp}}</updated>
|
||||
<author>
|
||||
<name>{{entry.authors[0].name}}</name>
|
||||
</author>
|
||||
|
||||
{% if publishers.__len__() > 0 %}
|
||||
{% if entry.authors.__len__() > 0 %}
|
||||
<author>
|
||||
<name>{{entry.authors[0].name}}</name>
|
||||
</author>
|
||||
{% endif %}
|
||||
{% if entry.publishers.__len__() > 0 %}
|
||||
<publisher>
|
||||
<name>{{entry.publishers[0].name}}</name>
|
||||
</publisher>
|
||||
|
@ -1289,9 +1289,9 @@ def get_updater_status():
|
||||
"1": _(u'Requesting update package'),
|
||||
"2": _(u'Downloading update package'),
|
||||
"3": _(u'Unzipping update package'),
|
||||
"4": _(u'Files are replaced'),
|
||||
"4": _(u'Replacing files'),
|
||||
"5": _(u'Database connections are closed'),
|
||||
"6": _(u'Server is stopped'),
|
||||
"6": _(u'Stopping server'),
|
||||
"7": _(u'Update finished, please press okay and reload page'),
|
||||
"8": _(u'Update failed:') + u' ' + _(u'HTTP Error'),
|
||||
"9": _(u'Update failed:') + u' ' + _(u'Connection error'),
|
||||
@ -1305,8 +1305,9 @@ def get_updater_status():
|
||||
elif request.method == "GET":
|
||||
try:
|
||||
status['status'] = helper.updater_thread.get_update_status()
|
||||
except Exception:
|
||||
status['status'] = 11
|
||||
except Exception as e:
|
||||
app.logger.exception(e)
|
||||
status['status'] = 7
|
||||
return json.dumps(status)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user