Rev4478, Skip slow updated files checking with large content.json
This commit is contained in:
parent
8ffd8d7a3e
commit
ad3920b26a
4 changed files with 10 additions and 7 deletions
|
@ -13,7 +13,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.7.1"
|
self.version = "0.7.1"
|
||||||
self.rev = 4473
|
self.rev = 4478
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.test_parser = None
|
self.test_parser = None
|
||||||
|
|
|
@ -1041,6 +1041,9 @@ class UiWebsocket(object):
|
||||||
|
|
||||||
inner_paths = [content_inner_path] + list(content.get("includes", {}).keys()) + list(content.get("files", {}).keys())
|
inner_paths = [content_inner_path] + list(content.get("includes", {}).keys()) + list(content.get("files", {}).keys())
|
||||||
|
|
||||||
|
if len(inner_paths) > 100:
|
||||||
|
return {"error": "Too many files in content.json"}
|
||||||
|
|
||||||
for relative_inner_path in inner_paths:
|
for relative_inner_path in inner_paths:
|
||||||
inner_path = helper.getDirname(content_inner_path) + relative_inner_path
|
inner_path = helper.getDirname(content_inner_path) + relative_inner_path
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -623,7 +623,7 @@ class Wrapper
|
||||||
|
|
||||||
updateModifiedPanel: =>
|
updateModifiedPanel: =>
|
||||||
@ws.cmd "siteListModifiedFiles", [], (res) =>
|
@ws.cmd "siteListModifiedFiles", [], (res) =>
|
||||||
num = res.modified_files.length
|
num = res.modified_files?.length
|
||||||
if num > 0
|
if num > 0
|
||||||
closed = @site_info.settings.modified_files_notification == false
|
closed = @site_info.settings.modified_files_notification == false
|
||||||
@infopanel.show(closed)
|
@infopanel.show(closed)
|
||||||
|
@ -642,8 +642,7 @@ class Wrapper
|
||||||
@notifications.add "sign", "done", "content.json Signed!", 5000
|
@notifications.add "sign", "done", "content.json Signed!", 5000
|
||||||
@sitePublish("content.json")
|
@sitePublish("content.json")
|
||||||
return false
|
return false
|
||||||
|
@log "siteListModifiedFiles", num, res
|
||||||
@log "siteListModifiedFiles", res
|
|
||||||
|
|
||||||
setAnnouncerInfo: (announcer_info) ->
|
setAnnouncerInfo: (announcer_info) ->
|
||||||
status_db = {announcing: [], error: [], announced: []}
|
status_db = {announcing: [], error: [], announced: []}
|
||||||
|
|
|
@ -1856,8 +1856,8 @@ $.extend( $.easing,
|
||||||
Wrapper.prototype.updateModifiedPanel = function() {
|
Wrapper.prototype.updateModifiedPanel = function() {
|
||||||
return this.ws.cmd("siteListModifiedFiles", [], (function(_this) {
|
return this.ws.cmd("siteListModifiedFiles", [], (function(_this) {
|
||||||
return function(res) {
|
return function(res) {
|
||||||
var closed, num;
|
var closed, num, ref;
|
||||||
num = res.modified_files.length;
|
num = (ref = res.modified_files) != null ? ref.length : void 0;
|
||||||
if (num > 0) {
|
if (num > 0) {
|
||||||
closed = _this.site_info.settings.modified_files_notification === false;
|
closed = _this.site_info.settings.modified_files_notification === false;
|
||||||
_this.infopanel.show(closed);
|
_this.infopanel.show(closed);
|
||||||
|
@ -1877,7 +1877,8 @@ $.extend( $.easing,
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return _this.log("siteListModifiedFiles", res);
|
debugger;
|
||||||
|
return _this.log("siteListModifiedFiles", num, res);
|
||||||
};
|
};
|
||||||
})(this));
|
})(this));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue