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):
|
||||
self.version = "0.7.1"
|
||||
self.rev = 4473
|
||||
self.rev = 4478
|
||||
self.argv = argv
|
||||
self.action = 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())
|
||||
|
||||
if len(inner_paths) > 100:
|
||||
return {"error": "Too many files in content.json"}
|
||||
|
||||
for relative_inner_path in inner_paths:
|
||||
inner_path = helper.getDirname(content_inner_path) + relative_inner_path
|
||||
try:
|
||||
|
|
|
@ -623,7 +623,7 @@ class Wrapper
|
|||
|
||||
updateModifiedPanel: =>
|
||||
@ws.cmd "siteListModifiedFiles", [], (res) =>
|
||||
num = res.modified_files.length
|
||||
num = res.modified_files?.length
|
||||
if num > 0
|
||||
closed = @site_info.settings.modified_files_notification == false
|
||||
@infopanel.show(closed)
|
||||
|
@ -642,8 +642,7 @@ class Wrapper
|
|||
@notifications.add "sign", "done", "content.json Signed!", 5000
|
||||
@sitePublish("content.json")
|
||||
return false
|
||||
|
||||
@log "siteListModifiedFiles", res
|
||||
@log "siteListModifiedFiles", num, res
|
||||
|
||||
setAnnouncerInfo: (announcer_info) ->
|
||||
status_db = {announcing: [], error: [], announced: []}
|
||||
|
|
|
@ -1856,8 +1856,8 @@ $.extend( $.easing,
|
|||
Wrapper.prototype.updateModifiedPanel = function() {
|
||||
return this.ws.cmd("siteListModifiedFiles", [], (function(_this) {
|
||||
return function(res) {
|
||||
var closed, num;
|
||||
num = res.modified_files.length;
|
||||
var closed, num, ref;
|
||||
num = (ref = res.modified_files) != null ? ref.length : void 0;
|
||||
if (num > 0) {
|
||||
closed = _this.site_info.settings.modified_files_notification === false;
|
||||
_this.infopanel.show(closed);
|
||||
|
@ -1877,7 +1877,8 @@ $.extend( $.easing,
|
|||
return false;
|
||||
});
|
||||
}
|
||||
return _this.log("siteListModifiedFiles", res);
|
||||
debugger;
|
||||
return _this.log("siteListModifiedFiles", num, res);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue