summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-03 15:19:48 +0300
committerValery Piashchynski <[email protected]>2021-07-03 15:19:48 +0300
commit677db79f76fcc566bee2b1b51d0f40a0c9f2ac19 (patch)
tree7c02179dd4b7927e2c01734ba8ee3b5b63ff831b /plugins
parente4834e08dcf5885623091bbe5e7e75e7950a07f3 (diff)
- Initial binary_heap
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/jobs/brokers/ephemeral/entry.go7
-rw-r--r--plugins/jobs/plugin.go2
2 files changed, 7 insertions, 2 deletions
diff --git a/plugins/jobs/brokers/ephemeral/entry.go b/plugins/jobs/brokers/ephemeral/entry.go
index bf8796d5..3cedec3e 100644
--- a/plugins/jobs/brokers/ephemeral/entry.go
+++ b/plugins/jobs/brokers/ephemeral/entry.go
@@ -1,13 +1,18 @@
package ephemeral
type entry struct {
- id string
+ id string
+ priority uint64
}
func (e *entry) ID() string {
return e.id
}
+func (e *entry) Priority() uint64 {
+ return e.priority
+}
+
func (e *entry) Ask() {
// no-op
}
diff --git a/plugins/jobs/plugin.go b/plugins/jobs/plugin.go
index 690402d6..6bf43a11 100644
--- a/plugins/jobs/plugin.go
+++ b/plugins/jobs/plugin.go
@@ -71,7 +71,7 @@ func (p *Plugin) Init(cfg config.Configurer, log logger.Logger, server server.Se
}
// initialize priority queue
- p.queue = priorityqueue.NewPriorityQueue()
+ p.queue = priorityqueue.NewBinHeap()
p.log = log
return nil