Warn if redis cache server not running
This commit is contained in:
parent
bfe1e04e39
commit
8f080ca31a
2 changed files with 10 additions and 0 deletions
|
|
@ -41,6 +41,10 @@ frappe.Application = Class.extend({
|
|||
this.start_notification_updates();
|
||||
|
||||
$(document).trigger('app_ready');
|
||||
|
||||
if (frappe.boot.bootmsg) {
|
||||
frappe.msgprint(frappe.boot.bootmsg);
|
||||
}
|
||||
},
|
||||
|
||||
load_bootinfo: function() {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ from frappe.utils import cint, cstr
|
|||
import frappe.model.meta
|
||||
import frappe.defaults
|
||||
import frappe.translate
|
||||
import redis
|
||||
from urllib import unquote
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
@ -90,8 +91,13 @@ def get():
|
|||
bootinfo = get_bootinfo()
|
||||
bootinfo["notification_info"] = get_notification_info_for_boot()
|
||||
frappe.cache().set_value("bootinfo", bootinfo, user=True)
|
||||
try:
|
||||
frappe.cache().ping()
|
||||
except redis.exceptions.ConnectionError:
|
||||
bootinfo['bootmsg'] = _("Redis cache server not running. Please contact Administrator / Tech support")
|
||||
|
||||
bootinfo["metadata_version"] = frappe.cache().get_value("metadata_version")
|
||||
|
||||
if not bootinfo["metadata_version"]:
|
||||
bootinfo["metadata_version"] = frappe.reset_metadata_version()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue