Skip to content

Commit

Permalink
remove scrolls dep
Browse files Browse the repository at this point in the history
  • Loading branch information
♠ ace hacker committed Nov 12, 2012
1 parent 6447e40 commit 2c7ce26
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
6 changes: 6 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 2.0.2
- remove scrolls dependency
- fix issue with notify not working on non-default queues

Version 2.0.1

Version 2.0.0
- simpler setup via QC::Setup.create (rake qc:create) & QC::Setup.drop (rake
qc:drop)
Expand Down
16 changes: 13 additions & 3 deletions lib/queue_classic.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require "scrolls"
require "pg"
require "uri"

Expand Down Expand Up @@ -73,7 +72,7 @@ def self.log_yield(data)
t0 = Time.now
yield
rescue => e
log({:level => :error, :error => e.class, :message => e.message.strip}.merge(data))
log({:at => "error", :error e.inspect}.merge(data))

This comment has been minimized.

Copy link
@be9

be9 Nov 13, 2012

Contributor

A typo!! 2.0.2 release is broken

This comment has been minimized.

Copy link
@ryandotsmith

ryandotsmith Nov 13, 2012

Contributor

shameful :(

2.0.3 is out and 2.0.2 has been yanked.

raise
ensure
t = Integer((Time.now - t0)*1000)
Expand All @@ -82,7 +81,18 @@ def self.log_yield(data)
end

def self.log(data)
Scrolls.log({:lib => :queue_classic}.merge(data))
result = nil
data = {:lib => "queue-classic"}.merge(data)
if block_given?
start = Time.now
result = yield
data.merge(:elapsed => Time.now - start)
end
data.reduce(out=String.new) do |s, tup|
s << [tup.first, tup.last].join("=") << " "
end
puts(out) if ENV["DEBUG"]
return result
end

end
3 changes: 1 addition & 2 deletions queue_classic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = "queue_classic"
s.email = "[email protected]"
s.version = "2.0.1"
s.version = "2.0.2"
s.date = "2012-07-23"
s.description = "queue_classic is a queueing library for Ruby apps. (Rails, Sinatra, Etc...) queue_classic features asynchronous job polling, database maintained locks and no ridiculous dependencies. As a matter of fact, queue_classic only requires pg."
s.summary = "postgres backed queue"
Expand All @@ -20,5 +20,4 @@ Gem::Specification.new do |s|
s.require_paths = %w[lib]

s.add_dependency "pg", "~> 0.14.0"
s.add_dependency "scrolls", "~> 0.2.1"
end

0 comments on commit 2c7ce26

Please sign in to comment.