Skip to content

Commit

Permalink
[commandResult@ZimiZones] updates frequency is now in seconds rather …
Browse files Browse the repository at this point in the history
…than miniutes (#844)
  • Loading branch information
henri committed Jul 3, 2023
1 parent d67110f commit f67393c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ MyDesklet.prototype = {
**/
_update() {
this._getCommandResult();
this.updateId = Mainloop.timeout_add_seconds(this.delay * 60, Lang.bind(this, this._update));
this.updateId = Mainloop.timeout_add_seconds(this.delay * 1, Lang.bind(this, this._update));
},

/**
Expand All @@ -215,7 +215,7 @@ MyDesklet.prototype = {
for(let command of this.commands){
if(!command.loading){
command.labels.label.set_text(command.label);
command.labels.result.set_text("Loading...");
//command.labels.result.set_text("Loading...");
command.loading = true;

Util.spawn_async(["/bin/bash", "-c", "timeout -k " + this.timeout + " " + this.timeout + " " + command.command + " || echo \"Timeout or error occured.\""], Lang.bind(this, this._setNewCommandResult, command));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"min": 1,
"max": 1440,
"description" : "Update every",
"units" : "minutes",
"units" : "seconds",
"step": 10
},
"timeout": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ MyDesklet.prototype = {
**/
_update() {
this._getCommandResult();
this.updateId = Mainloop.timeout_add_seconds(this.delay * 60, Lang.bind(this, this._update));
this.updateId = Mainloop.timeout_add_seconds(this.delay * 1, Lang.bind(this, this._update));
},

/**
Expand All @@ -215,7 +215,7 @@ MyDesklet.prototype = {
for(let command of this.commands){
if(!command.loading){
command.labels.label.set_text(command.label);
command.labels.result.set_text("Loading...");
//command.labels.result.set_text("Loading...");
command.loading = true;

Util.spawn_async(["/bin/bash", "-c", "timeout -k " + this.timeout + " " + this.timeout + " " + command.command + " || echo \"Timeout or error occured.\""], Lang.bind(this, this._setNewCommandResult, command));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"min": 1,
"max": 1440,
"description" : "Update every",
"units" : "minutes",
"units" : "seconds",
"step": 10
},
"timeout": {
Expand Down

0 comments on commit f67393c

Please sign in to comment.