summaryrefslogtreecommitdiff
path: root/gerrit-widget
diff options
context:
space:
mode:
authorChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
committerChris Bruce <aprofessionalemailaddress@gmail.com>2020-09-19 01:08:15 -0700
commita2eddcdfcd87976866f797b5ad2b795495d2e620 (patch)
treee3498520985e33915a211389951d6c0c971b972b /gerrit-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
Add widget timeouts
Diffstat (limited to 'gerrit-widget')
-rw-r--r--gerrit-widget/gerrit.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/gerrit-widget/gerrit.lua b/gerrit-widget/gerrit.lua
index 69036d0..ad5d7a6 100644
--- a/gerrit-widget/gerrit.lua
+++ b/gerrit-widget/gerrit.lua
@@ -38,6 +38,7 @@ local function worker(args)
text = 'Gerrit host is unknown'
}
local query = args.query or 'is:reviewer AND status:open AND NOT is:wip'
+ local timeout = args.timeout or 10
local current_number_of_reviews
local previous_number_of_reviews = 0
@@ -220,7 +221,7 @@ local function worker(args)
)
)
- watch(string.format(GET_CHANGES_CMD, host, query:gsub(" ", "+")), 10, update_widget, gerrit_widget)
+ watch(string.format(GET_CHANGES_CMD, host, query:gsub(" ", "+")), timeout, update_widget, gerrit_widget)
return gerrit_widget
end