resque-data-warehouse 0.1.0 → 0.1.1
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/HISTORY.md +4 -0
- data/README.md +6 -7
- data/lib/resque/plugins/data_warehouse.rb +1 -4
- data/lib/resque/plugins/data_warehouse/fact.rb +1 -1
- data/test/test_helper.rb +1 -0
- metadata +8 -24
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Resque Data Warehouse
|
2
2
|
=====================
|
3
3
|
|
4
|
-
A [Resque][rq] plugin. Requires Resque 1.9.10.
|
4
|
+
A [Resque][rq] plugin. Requires Resque 1.9.10 or higher.
|
5
5
|
|
6
6
|
resque-data-warehouse allows you to use Redis to queue up and then Resque to process transactions
|
7
7
|
on transaction-heavy tables that need to be replicated on other tables optimized for
|
@@ -10,12 +10,11 @@ reporting.
|
|
10
10
|
Transactions for a given object (classname + ID) are queued up behind a Redis key,
|
11
11
|
and then processed using Resque jobs. If load is low, each transaction will be processed
|
12
12
|
almost immediately after it occurs; at higher loads, multiple transactions will queue up
|
13
|
-
before the Resque job gets to them, and then only the
|
14
|
-
data warehousing table, thus minimizing database load and dynamically adjusting
|
15
|
-
in the copy to match the current load.
|
13
|
+
before the Resque job gets to them, and then only the cumulative result of the previous transactions
|
14
|
+
will be applied to the data warehousing table, thus minimizing database load and dynamically adjusting
|
15
|
+
the delay in the copy to match the current load.
|
16
16
|
|
17
|
-
This only works with Rails; it has
|
18
|
-
gem is also required.
|
17
|
+
This only works with Rails >=3.0; it has been tested with Rails 3.0.5.
|
19
18
|
|
20
19
|
Usage / Examples
|
21
20
|
----------------
|
@@ -58,7 +57,7 @@ Install
|
|
58
57
|
|
59
58
|
### In a Rails app, as a plugin
|
60
59
|
|
61
|
-
$ ./script/plugin install git://github.com/
|
60
|
+
$ ./script/plugin install git://github.com/Mechaferret/resque-data-warehouse.git
|
62
61
|
|
63
62
|
|
64
63
|
Acknowledgements
|
@@ -1,8 +1,5 @@
|
|
1
1
|
module Resque
|
2
2
|
module Plugins
|
3
|
-
#
|
4
|
-
# data_warehoused
|
5
|
-
#
|
6
3
|
module DataWarehouse
|
7
4
|
Dir[File.dirname(__FILE__) + '/data_warehouse/*.rb'].each{|g| require g}
|
8
5
|
def self.included(base)
|
@@ -12,7 +9,7 @@ module Resque
|
|
12
9
|
module ClassMethods
|
13
10
|
def warehoused
|
14
11
|
include InstanceMethods
|
15
|
-
|
12
|
+
after_commit :record_to_fact
|
16
13
|
after_destroy :destroy_fact
|
17
14
|
end
|
18
15
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-data-warehouse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Monica McArthur
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-07 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -38,34 +38,18 @@ dependencies:
|
|
38
38
|
name: rails
|
39
39
|
prerelease: false
|
40
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 11
|
46
|
-
segments:
|
47
|
-
- 2
|
48
|
-
- 3
|
49
|
-
- 4
|
50
|
-
version: 2.3.4
|
51
|
-
type: :runtime
|
52
|
-
version_requirements: *id002
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: after_commit
|
55
|
-
prerelease: false
|
56
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
57
41
|
none: false
|
58
42
|
requirements:
|
59
43
|
- - ">="
|
60
44
|
- !ruby/object:Gem::Version
|
61
45
|
hash: 7
|
62
46
|
segments:
|
63
|
-
-
|
47
|
+
- 3
|
64
48
|
- 0
|
65
|
-
-
|
66
|
-
version:
|
49
|
+
- 0
|
50
|
+
version: 3.0.0
|
67
51
|
type: :runtime
|
68
|
-
version_requirements: *
|
52
|
+
version_requirements: *id002
|
69
53
|
description: " A Resque plugin. Allows you to use Redis to queue up and then Resque to process transactions \n on transaction-heavy tables that need to be replicated on other tables optimized for \n reporting.\n"
|
70
54
|
email: mechaferret@gmail.com
|
71
55
|
executables: []
|