1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-15 22:34:51 +00:00

Log task choosing

This commit is contained in:
Jeremy Ruston 2023-11-09 17:57:22 +00:00
parent d77eee291c
commit 646620fc42

View File

@ -505,6 +505,7 @@ Syncer.prototype.processTaskQueue = function() {
if((!this.syncadaptor.isReady || this.syncadaptor.isReady()) && this.numTasksInProgress === 0) {
// Choose the next task to perform
var task = this.chooseNextTask();
self.logger.log("Chosen next task " + task);
// Perform the task if we had one
if(typeof task === "object" && task !== null) {
this.numTasksInProgress += 1;
@ -596,6 +597,10 @@ function SaveTiddlerTask(syncer,title) {
this.type = "save";
}
SaveTiddlerTask.prototype.toString = function() {
return "SAVE " + this.title;
}
SaveTiddlerTask.prototype.run = function(callback) {
var self = this,
changeCount = this.syncer.wiki.getChangeCount(this.title),
@ -632,6 +637,10 @@ function DeleteTiddlerTask(syncer,title) {
this.type = "delete";
}
DeleteTiddlerTask.prototype.toString = function() {
return "DELETE " + this.title;
}
DeleteTiddlerTask.prototype.run = function(callback) {
var self = this;
this.syncer.logger.log("Dispatching 'delete' task:",this.title);
@ -656,6 +665,10 @@ function LoadTiddlerTask(syncer,title) {
this.type = "load";
}
LoadTiddlerTask.prototype.toString = function() {
return "LOAD " + this.title;
}
LoadTiddlerTask.prototype.run = function(callback) {
var self = this;
this.syncer.logger.log("Dispatching 'load' task:",this.title);