1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-25 09:30:31 +00:00

Additional version info for sqlite database

This commit is contained in:
OzzieIsaacs 2017-02-25 09:02:59 +01:00
parent b876505f22
commit 1a83ad713c
5 changed files with 12 additions and 4 deletions

View File

@ -294,7 +294,7 @@ def setup_db():
return False
dbpath = os.path.join(config.config_calibre_dir, "metadata.db")
engine = create_engine('sqlite:///{0}'.format(dbpath.encode('utf-8')), echo=False)
engine = create_engine('sqlite:///{0}'.format(dbpath.encode('utf-8')), echo=False, isolation_level="SERIALIZABLE")
try:
conn = engine.connect()

View File

@ -50,7 +50,7 @@ $(function() {
});
$("#check_for_update").click(function() {
var button_text = $("#check_for_update").html();
$("#check_for_update").html('Checking...');
$("#check_for_update").html('...');
$.ajax({
dataType: 'json',
url: window.location.pathname+"/../../get_update_status",

View File

@ -78,7 +78,14 @@
<th>Requests</th>
<td>v{{versions['requests']}}</td>
</tr>
<tr>
<th>SQlite</th>
<td>v{{versions['sqlite']}}</td>
</tr>
<tr>
<th>Pysqlite</th>
<td>v{{versions['pysqlite']}}</td>
</tr>
</tbody>
</table>

View File

@ -7,7 +7,6 @@ from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import *
from flask_login import AnonymousUserMixin
import os
import traceback
import logging
from werkzeug.security import generate_password_hash
from flask_babel import gettext as _

View File

@ -1055,6 +1055,8 @@ def stats():
versions['tornado'] = tornadoVersion
versions['iso639'] = iso639Version
versions['requests'] = requests.__version__
versions['pysqlite'] = db.engine.dialect.dbapi.version
versions['sqlite'] = db.engine.dialect.dbapi.sqlite_version
return render_title_template('stats.html', bookcounter=counter, authorcounter=authors, versions=versions,
categorycounter=categorys, seriecounter=series, title=_(u"Statistics"))