queue_classic 2.0.0rc10 → 2.0.0rc11

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,11 +18,6 @@ module QC
18
18
  SqlFunctions = File.join(QC::Root, "/sql/ddl.sql")
19
19
  DropSqlFunctions = File.join(QC::Root, "/sql/drop_ddl.sql")
20
20
 
21
- DB_URL =
22
- ENV["QC_DATABASE_URL"] ||
23
- ENV["DATABASE_URL"] ||
24
- raise(ArgumentError, "missing QC_DATABASE_URL or DATABASE_URL")
25
-
26
21
  # You can use the APP_NAME to query for
27
22
  # postgres related process information in the
28
23
  # pg_stat_activity table. Don't set this unless
@@ -84,7 +84,11 @@ module QC
84
84
  end
85
85
 
86
86
  def db_url
87
- URI.parse(DB_URL)
87
+ return @db_url if @db_url
88
+ url = ENV["QC_DATABASE_URL"] ||
89
+ ENV["DATABASE_URL"] ||
90
+ raise(ArgumentError, "missing QC_DATABASE_URL or DATABASE_URL")
91
+ @db_url = URI.parse(url)
88
92
  end
89
93
 
90
94
  def log(msg)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue_classic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0rc10
4
+ version: 2.0.0rc11
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-29 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg
16
- requirement: &13897100 !ruby/object:Gem::Requirement
16
+ requirement: &14553400 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 0.13.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *13897100
24
+ version_requirements: *14553400
25
25
  description: queue_classic is a queueing library for Ruby apps. (Rails, Sinatra, Etc...)
26
26
  queue_classic features asynchronous job polling, database maintained locks and no
27
27
  ridiculous dependencies. As a matter of fact, queue_classic only requires pg.