diff options
author | Valery Piashchynski <[email protected]> | 2021-07-14 11:35:12 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-14 11:35:12 +0300 |
commit | d099e47ab28dd044d34e18347a4c714b8af3d612 (patch) | |
tree | e106e13bba48e435b87d218237b282d7f691b52c /pkg | |
parent | ec7c049036d31fe030d106db9f0d268ea0296c5f (diff) |
SQS driver.
Fix isssues in the AMQP driver.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/priority_queue/binary_heap.go | 1 | ||||
-rw-r--r-- | pkg/priority_queue/binary_heap_test.go | 4 | ||||
-rw-r--r-- | pkg/priority_queue/interface.go | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/pkg/priority_queue/binary_heap.go b/pkg/priority_queue/binary_heap.go index 514ca460..fc043927 100644 --- a/pkg/priority_queue/binary_heap.go +++ b/pkg/priority_queue/binary_heap.go @@ -56,7 +56,6 @@ func (bh *BinHeap) fixDown(curr, end int) { } idxToSwap := cOneIdx - // oh my, so unsafe if cTwoIdx > -1 && (bh.items)[cTwoIdx].Priority() < (bh.items)[cOneIdx].Priority() { idxToSwap = cTwoIdx } diff --git a/pkg/priority_queue/binary_heap_test.go b/pkg/priority_queue/binary_heap_test.go index f30cf8d8..663741ad 100644 --- a/pkg/priority_queue/binary_heap_test.go +++ b/pkg/priority_queue/binary_heap_test.go @@ -32,8 +32,8 @@ func (t Test) ID() string { return "none" } -func (t Test) Priority() uint64 { - return uint64(t) +func (t Test) Priority() int64 { + return int64(t) } func TestBinHeap_Init(t *testing.T) { diff --git a/pkg/priority_queue/interface.go b/pkg/priority_queue/interface.go index 1efebf1c..d64aaf3d 100644 --- a/pkg/priority_queue/interface.go +++ b/pkg/priority_queue/interface.go @@ -12,7 +12,7 @@ type Item interface { ID() string // Priority returns the Item's priority to sort - Priority() uint64 + Priority() int64 // Body is the Item payload Body() []byte |