queue_classic 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f51bc9067f68e130bfeeaa2ca5a34fdc1d7deff
4
- data.tar.gz: 7c1af02c3ffa6dfb3933465a5bf96b616d859d3b
3
+ metadata.gz: 304e54835338b4b3e386e3aa6c148cb32c0d0173
4
+ data.tar.gz: a934035fd30833b15c2a1c5890986c8a690ef421
5
5
  SHA512:
6
- metadata.gz: c01bf547c204d77353b918e82481a4a7a2c71eed42d634a97da972178d86f5224e631db1097ae54f30cc930786fdfb1b068717c19338226a608632c5a36f14ad
7
- data.tar.gz: 6458a6dd13ee5dd58ccca5fd2f5a64e6b3cf74524143d6bef3b83ab4b83cdb59d98e27264ccc0fc5a0d009efa0983bab5eac8fee9381a5b3155dd192024562e1
6
+ metadata.gz: 92108ca7eb38e66783c1242b302174b09983cdc667f93ec92b7a390e73c937f035efd0d325df242be616e258280dbeb1f3ae8205b48dedf147fcbc71feb2b5bb
7
+ data.tar.gz: b5bc29826dfb50dda2d03155ee9cd0b3526ed6796b112a69e6d9c33ed223b46d1d2ea499179fe8e6d2f73ce68ffb6c080cc1599de55ad749345212b8a0833770
@@ -23,6 +23,10 @@ module QC
23
23
  if self.class.migration_exists?('db/migrate', 'update_queue_classic_3_0_0').nil?
24
24
  migration_template 'update_queue_classic_3_0_0.rb', 'db/migrate/update_queue_classic_3_0_0.rb'
25
25
  end
26
+
27
+ if self.class.migration_exists?('db/migrate', 'update_queue_classic_3_0_2').nil?
28
+ migration_template 'update_queue_classic_3_0_2.rb', 'db/migrate/update_queue_classic_3_0_2.rb'
29
+ end
26
30
  end
27
31
  end
28
32
  end
@@ -0,0 +1,11 @@
1
+ class UpdateQueueClassic302 < ActiveRecord::Migration
2
+ def self.up
3
+ QC::Setup.update_to_3_0_0
4
+ end
5
+
6
+ def self.down
7
+ # This migration is fixing a bug, so we don't want to do anything here.
8
+ # I didn't want to make it irreversible either, as it could prevent
9
+ # rolling back other, unrelated, stuff.
10
+ end
11
+ end
@@ -5,7 +5,7 @@ module QC
5
5
  CreateTable = File.join(Root, "/sql/create_table.sql")
6
6
  DropSqlFunctions = File.join(Root, "/sql/drop_ddl.sql")
7
7
  UpgradeTo_3_0_0 = File.join(Root, "/sql/update_to_3_0_0.sql")
8
- DowngradeTo_3_0_0 = File.join(Root, "/sql/downgrade_from_3_0_0.sql")
8
+ DowngradeFrom_3_0_0 = File.join(Root, "/sql/downgrade_from_3_0_0.sql")
9
9
 
10
10
  def self.create(c = QC::default_conn_adapter.connection)
11
11
  conn = QC::ConnAdapter.new(c)
@@ -37,7 +37,7 @@ module QC
37
37
 
38
38
  def self.downgrade_from_3_0_0(c = QC::default_conn_adapter.connection)
39
39
  conn = QC::ConnAdapter.new(c)
40
- conn.execute(File.read(DowngradeTo_3_0_0))
40
+ conn.execute(File.read(DowngradeFrom_3_0_0))
41
41
  end
42
42
  end
43
43
  end
data/readme.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # queue_classic
2
2
 
3
- [![Build Status](https://travis-ci.org/ryandotsmith/queue_classic.svg?branch=master)](https://travis-ci.org/ryandotsmith/queue_classic)
4
- [![Code Climate](https://codeclimate.com/github/ryandotsmith/queue_classic.png)](https://codeclimate.com/github/ryandotsmith/queue_classic)
3
+ [![Build Status](https://travis-ci.org/QueueClassic/queue_classic.svg?branch=master)](https://travis-ci.org/QueueClassic/queue_classic)
4
+ [![Code Climate](https://codeclimate.com/github/QueueClassic/queue_classic.png)](https://codeclimate.com/github/QueueClassic/queue_classic)
5
+
6
+ Current: v3.0.X
7
+ Older stable: [v2.2.3](https://github.com/QueueClassic/queue_classic/tree/v2.2.3)
5
8
 
6
- Stable: [v2.2.3](https://github.com/ryandotsmith/queue_classic/tree/v2.2.3)
7
- Latest: v3.0.0
8
9
 
9
10
  queue_classic provides a simple interface to a PostgreSQL-backed message queue. queue_classic specializes in concurrent locking and minimizing database load while providing a simple, intuitive developer experience. queue_classic assumes that you are already using PostgreSQL in your production environment and that adding another dependency (e.g. redis, beanstalkd, 0mq) is undesirable.
10
11
 
@@ -192,7 +193,7 @@ $ bundle exec rake qc:update
192
193
 
193
194
  ## Configuration
194
195
 
195
- All configuration takes place in the form of environment vars. See [queue_classic.rb](https://github.com/ryandotsmith/queue_classic/blob/master/lib/queue_classic.rb#L23-62) for a list of options.
196
+ All configuration takes place in the form of environment vars. See [queue_classic.rb](https://github.com/QueueClassic/queue_classic/blob/master/lib/queue_classic.rb#L23-62) for a list of options.
196
197
 
197
198
  ## JSON
198
199
 
@@ -235,8 +236,8 @@ https://groups.google.com/d/forum/queue_classic
235
236
 
236
237
  ## Hacking on queue_classic
237
238
 
238
- [![Build Status](https://travis-ci.org/ryandotsmith/queue_classic.svg?branch=master)](https://travis-ci.org/ryandotsmith/queue_classic)
239
- [![Code Climate](https://codeclimate.com/github/ryandotsmith/queue_classic.png)](https://codeclimate.com/github/ryandotsmith/queue_classic)
239
+ [![Build Status](https://travis-ci.org/QueueClassic/queue_classic.svg?branch=master)](https://travis-ci.org/QueueClassic/queue_classic)
240
+ [![Code Climate](https://codeclimate.com/github/QueueClassic/queue_classic.png)](https://codeclimate.com/github/QueueClassic/queue_classic)
240
241
 
241
242
  ### Dependencies
242
243
 
@@ -18,14 +18,4 @@ end if;
18
18
 
19
19
  end $$ language plpgsql;
20
20
 
21
- create function queue_classic_notify() returns trigger as $$ begin
22
- perform pg_notify(new.q_name, '');
23
- return null;
24
- end $$ language plpgsql;
25
-
26
- create trigger queue_classic_notify
27
- after insert on queue_classic_jobs
28
- for each row
29
- execute procedure queue_classic_notify();
30
-
31
21
  CREATE INDEX idx_qc_on_name_only_unlocked ON queue_classic_jobs (q_name, id) WHERE locked_at IS NULL;
@@ -67,3 +67,14 @@ BEGIN
67
67
  RETURN QUERY EXECUTE 'SELECT * FROM lock_head($1,10)' USING tname;
68
68
  END;
69
69
  $$ LANGUAGE plpgsql;
70
+
71
+ -- queue_classic_notify function and trigger
72
+ create function queue_classic_notify() returns trigger as $$ begin
73
+ perform pg_notify(new.q_name, '');
74
+ return null;
75
+ end $$ language plpgsql;
76
+
77
+ create trigger queue_classic_notify
78
+ after insert on queue_classic_jobs
79
+ for each row
80
+ execute procedure queue_classic_notify();
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue_classic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Smith (♠ ace hacker)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-02 00:00:00.000000000 Z
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.17.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.17.0
27
27
  description: queue_classic is a queueing library for Ruby apps. (Rails, Sinatra, Etc...)
@@ -32,22 +32,23 @@ executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
+ - readme.md
36
+ - sql/create_table.sql
37
+ - sql/ddl.sql
38
+ - sql/downgrade_from_3_0_0.sql
39
+ - sql/drop_ddl.sql
40
+ - sql/update_to_3_0_0.sql
35
41
  - lib/generators/queue_classic/install_generator.rb
36
42
  - lib/generators/queue_classic/templates/add_queue_classic.rb
37
43
  - lib/generators/queue_classic/templates/update_queue_classic_3_0_0.rb
38
- - lib/queue_classic.rb
44
+ - lib/generators/queue_classic/templates/update_queue_classic_3_0_2.rb
39
45
  - lib/queue_classic/conn_adapter.rb
40
46
  - lib/queue_classic/queue.rb
41
47
  - lib/queue_classic/railtie.rb
42
48
  - lib/queue_classic/setup.rb
43
49
  - lib/queue_classic/tasks.rb
44
50
  - lib/queue_classic/worker.rb
45
- - readme.md
46
- - sql/create_table.sql
47
- - sql/ddl.sql
48
- - sql/downgrade_from_3_0_0.sql
49
- - sql/drop_ddl.sql
50
- - sql/update_to_3_0_0.sql
51
+ - lib/queue_classic.rb
51
52
  - test/benchmark_test.rb
52
53
  - test/helper.rb
53
54
  - test/lib/queue_classic_test.rb
@@ -63,17 +64,17 @@ require_paths:
63
64
  - lib
64
65
  required_ruby_version: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - ">="
67
+ - - '>='
67
68
  - !ruby/object:Gem::Version
68
69
  version: '0'
69
70
  required_rubygems_version: !ruby/object:Gem::Requirement
70
71
  requirements:
71
- - - ">="
72
+ - - '>='
72
73
  - !ruby/object:Gem::Version
73
74
  version: '0'
74
75
  requirements: []
75
76
  rubyforge_project:
76
- rubygems_version: 2.2.2
77
+ rubygems_version: 2.0.14
77
78
  signing_key:
78
79
  specification_version: 4
79
80
  summary: Simple, efficient worker queue for Ruby & PostgreSQL.