summaryrefslogtreecommitdiff
path: root/plugins/jobs/pipeline/pipeline.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-14 11:35:12 +0300
committerValery Piashchynski <[email protected]>2021-07-14 11:35:12 +0300
commitd099e47ab28dd044d34e18347a4c714b8af3d612 (patch)
treee106e13bba48e435b87d218237b282d7f691b52c /plugins/jobs/pipeline/pipeline.go
parentec7c049036d31fe030d106db9f0d268ea0296c5f (diff)
SQS driver.
Fix isssues in the AMQP driver. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/pipeline/pipeline.go')
-rw-r--r--plugins/jobs/pipeline/pipeline.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/jobs/pipeline/pipeline.go b/plugins/jobs/pipeline/pipeline.go
index 91898178..90eeb189 100644
--- a/plugins/jobs/pipeline/pipeline.go
+++ b/plugins/jobs/pipeline/pipeline.go
@@ -55,10 +55,21 @@ func (p Pipeline) Int(name string, d int) int {
return d
}
+// Bool must return option value as bool or return default value.
+func (p Pipeline) Bool(name string, d bool) bool {
+ if value, ok := p[name]; ok {
+ if i, ok := value.(bool); ok {
+ return i
+ }
+ }
+
+ return d
+}
+
// Priority returns default pipeline priority
-func (p Pipeline) Priority() uint64 {
+func (p Pipeline) Priority() int64 {
if value, ok := p[priority]; ok {
- if v, ok := value.(uint64); ok {
+ if v, ok := value.(int64); ok {
return v
}
}