summaryrefslogtreecommitdiff
path: root/bitbucket-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 /bitbucket-widget
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
Add widget timeouts
Diffstat (limited to 'bitbucket-widget')
-rw-r--r--bitbucket-widget/bitbucket.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbucket-widget/bitbucket.lua b/bitbucket-widget/bitbucket.lua
index 18ab571..b871d6e 100644
--- a/bitbucket-widget/bitbucket.lua
+++ b/bitbucket-widget/bitbucket.lua
@@ -76,6 +76,7 @@ local function worker(args)
local uuid = args.uuid or show_warning('UUID is not set')
local workspace = args.workspace or show_warning('Workspace is not set')
local repo_slug = args.repo_slug or show_warning('Repo slug is not set')
+ local timeout = args.timeout or 60
local current_number_of_prs
@@ -267,7 +268,7 @@ local function worker(args)
)
watch(string.format(GET_PRS_CMD, host, workspace, repo_slug, uuid, uuid),
- 60, update_widget, bitbucket_widget)
+ timeout, update_widget, bitbucket_widget)
return bitbucket_widget
end