[gnome-continuous] autobuilder: Don't bother passing a blank onEmpty
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] autobuilder: Don't bother passing a blank onEmpty
- Date: Wed, 9 Oct 2013 20:31:07 +0000 (UTC)
commit 3360c95e92c76c9dcc0c248a8a453788a51ab6a3
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Oct 9 16:06:24 2013 -0400
autobuilder: Don't bother passing a blank onEmpty
Just check for not-null when we call it.
src/js/builtins/autobuilder.js | 6 +-----
src/js/task.js | 3 ++-
2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/js/builtins/autobuilder.js b/src/js/builtins/autobuilder.js
index d98c332..6aa8d3f 100644
--- a/src/js/builtins/autobuilder.js
+++ b/src/js/builtins/autobuilder.js
@@ -70,8 +70,7 @@ const Autobuilder = new Lang.Class({
this._impl = Gio.DBusExportedObject.wrapJSObject(AutoBuilderIface, this);
this._impl.export(Gio.DBus.session, '/org/gnome/OSTreeBuild/AutoBuilder');
- this._taskmaster = new Task.TaskMaster(this.workdir,
- { onEmpty: Lang.bind(this, this._onTasksComplete) });
+ this._taskmaster = new Task.TaskMaster(this.workdir);
this._taskmaster.connect('task-executing', Lang.bind(this, this._onTaskExecuting));
this._taskmaster.connect('task-complete', Lang.bind(this, this._onTaskCompleted));
@@ -88,9 +87,6 @@ const Autobuilder = new Lang.Class({
loop.run();
},
- _onTasksComplete: function() {
- },
-
_onTaskExecuting: function(taskmaster, task) {
print("Task " + task.name + " executing on " + task.buildName);
this._updateStatus();
diff --git a/src/js/task.js b/src/js/task.js
index 49f1fd6..831ff2c 100644
--- a/src/js/task.js
+++ b/src/js/task.js
@@ -264,7 +264,8 @@ const TaskMaster = new Lang.Class({
if (this._executing.length == 0 &&
this._pendingTasksList.length == 0) {
- this._onEmpty(true, null);
+ if (this._onEmpty)
+ this._onEmpty(true, null);
return;
} else if (this._pendingTasksList.length == 0) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]