queue_classic 0.3.7.pre → 1.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/queue_classic/database.rb +1 -1
- data/lib/queue_classic/durable_array.rb +1 -0
- data/lib/queue_classic/worker.rb +1 -1
- data/readme.md +27 -19
- metadata +7 -11
data/lib/queue_classic/worker.rb
CHANGED
@@ -113,7 +113,7 @@ module QC
|
|
113
113
|
if can_listen?
|
114
114
|
log("worker waiting on LISTEN")
|
115
115
|
@queue.database.listen
|
116
|
-
@queue.database.wait_for_notify(t)
|
116
|
+
@queue.database.wait_for_notify(t)
|
117
117
|
@queue.database.unlisten
|
118
118
|
@queue.database.drain_notify
|
119
119
|
log("worker finished LISTEN")
|
data/readme.md
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# queue_classic
|
2
|
+
v1.0.0
|
3
3
|
|
4
|
-
|
4
|
+
queue_classic is a PostgreSQL-backed queueing library that is focused on
|
5
5
|
concurrent job locking, minimizing database load & providing a simple &
|
6
6
|
intuitive user experience.
|
7
7
|
|
8
|
-
|
8
|
+
queue_classic features:
|
9
9
|
|
10
10
|
* Support for multiple queues with heterogeneous workers
|
11
|
-
* Utilization of
|
11
|
+
* Utilization of Postgres' PUB/SUB
|
12
12
|
* JSON encoding for jobs
|
13
|
+
* Forking workers
|
13
14
|
* Postgres' rock-solid locking mechanism
|
14
15
|
* Long term support
|
15
16
|
|
@@ -17,27 +18,34 @@ Queue Classic Features:
|
|
17
18
|
|
18
19
|
See doc/installation.md for Rails instructions
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
```bash
|
22
|
+
$ createdb queue_classic_test
|
23
|
+
$ psql queue_classic_test
|
24
|
+
psql=# CREATE TABLE queue_classic_jobs (id serial, details text, locked_at timestamp);
|
25
|
+
psql=# CREATE INDEX queue_classic_jobs_id_idx ON queue_classic_jobs (id);
|
26
|
+
$ export QC_DATABASE_URL="postgres://username:password@localhost/queue_classic_test"
|
27
|
+
$ gem install queue_classic
|
28
|
+
$ ruby -r queue_classic -e "QC::Database.new.load_functions"
|
29
|
+
$ ruby -r queue_classic -e "QC.enqueue("Kernel.puts", "hello world")"
|
30
|
+
$ ruby -r queue_classic -e "QC::Worker.new.start"
|
31
|
+
```
|
26
32
|
|
27
|
-
## Hacking on
|
33
|
+
## Hacking on queue_classic
|
28
34
|
|
29
35
|
### Dependencies
|
30
36
|
|
31
|
-
*
|
32
|
-
*
|
33
|
-
*
|
37
|
+
* Ruby 1.9.2
|
38
|
+
* Postgres ~> 9.0
|
39
|
+
* Rubygems: pg ~> 0.11.0
|
34
40
|
|
35
41
|
### Running Tests
|
36
42
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
43
|
+
```bash
|
44
|
+
$ bundle
|
45
|
+
$ createdb queue_classic_test
|
46
|
+
$ export QC_DATABASE_URL="postgres://username:pass@localhost/queue_classic_test"
|
47
|
+
$ rake
|
48
|
+
```
|
41
49
|
|
42
50
|
### Building Documentation
|
43
51
|
|
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: 0.
|
4
|
+
version: 1.0.0.rc1
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-08-22 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pg
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156924400 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,11 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.11.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description:
|
26
|
-
|
27
|
-
|
28
|
-
the pg and json.
|
24
|
+
version_requirements: *2156924400
|
25
|
+
description: queue_classic is a queueing library for Ruby apps. (Rails, Sinatra, Etc...)
|
26
|
+
queue_classic features asynchronous job polling, database maintained locks and no
|
27
|
+
ridiculous dependencies. As a matter of fact, queue_classic only requires pg.
|
29
28
|
email: ryan@heroku.com
|
30
29
|
executables: []
|
31
30
|
extensions: []
|
@@ -70,10 +69,7 @@ rubyforge_project:
|
|
70
69
|
rubygems_version: 1.8.7
|
71
70
|
signing_key:
|
72
71
|
specification_version: 3
|
73
|
-
summary:
|
74
|
-
Etc...) Queue Classic features asynchronous job polling, database maintained locks
|
75
|
-
and no ridiculous dependencies. As a matter of fact, Queue Classic only requires
|
76
|
-
the pg and json.(simple)
|
72
|
+
summary: postgres backed queue
|
77
73
|
test_files:
|
78
74
|
- test/database_test.rb
|
79
75
|
- test/durable_array_test.rb
|