Skip to content

Commit

Permalink
push and enqueue now cannot be passed a time.
Browse files Browse the repository at this point in the history
This allows them to be more tightly coupled with pop and dequeue,
while insert/add and remove/delete stay coupled as less purely queue
based, but more performant.
  • Loading branch information
Jay Bhat committed Apr 4, 2012
1 parent 3dc9899 commit 7603119
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/cassandra-queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ def insert(payload, time = Time.now, options = {})
end

alias :add :insert
alias :enqueue :insert
alias :push :insert

def push(payload, options = {})
insert(payload, Time.now, options)
end

alias :enqueue :push

# Removes a TimeUUID, and it's payload, from the queue
def remove(timeUUID, options = {})
Expand Down

0 comments on commit 7603119

Please sign in to comment.