queue_classic-later 0.0.3 → 0.1.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +4 -0
- data/lib/queue_classic/later/version.rb +1 -1
- data/lib/queue_classic/later.rb +2 -2
- data/queue_classic-later.gemspec +1 -1
- metadata +12 -22
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2708ce84745f731037fe159880b285bafe5c7106
|
4
|
+
data.tar.gz: 9a4c87bb4350cbc6d6369db08531bfa183639034
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6a65686592b55415d9ca760214f2d4d908065275257a4ae95fb7429e00ec905ed243d9f8a079bdfb9a81e6a4cd0ac6578fc7e440f5e25b2bb8b79aec785f6a08
|
7
|
+
data.tar.gz: bf40b932daf8ec96e1c6dcee44932ce41212702c28226a0fa6d920f698de983e2104927141be6a3af7b0e7be3f96f8a0ff2d8d4e873ccef49f0112d8ce1e870c
|
data/README.md
CHANGED
@@ -46,6 +46,10 @@ QC.enqueue_at(Time.new(2012, 10, 13, 12, 34, 56), "Kernel.puts", "hello world")
|
|
46
46
|
|
47
47
|
`QC::Later.tick` will enqueue these jobs to be worked by your worker(s) at the appropriate time.
|
48
48
|
|
49
|
+
## Credit
|
50
|
+
|
51
|
+
Heavily inspired by [resque-scheduler](https://github.com/bvandenbos/resque-scheduler).
|
52
|
+
|
49
53
|
## Contributing
|
50
54
|
|
51
55
|
1. Fork it
|
data/lib/queue_classic/later.rb
CHANGED
@@ -28,7 +28,7 @@ module QC
|
|
28
28
|
def insert(q_name, not_before, method, args)
|
29
29
|
QC.log_yield(:action => "insert_later_job") do
|
30
30
|
s = "INSERT INTO #{QC::Later::TABLE_NAME} (q_name, not_before, method, args) VALUES ($1, $2, $3, $4)"
|
31
|
-
QC::Conn.execute(s, q_name, not_before, method,
|
31
|
+
QC::Conn.execute(s, q_name, not_before, method, MultiJson.encode(args))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -55,7 +55,7 @@ module QC
|
|
55
55
|
def tick
|
56
56
|
QC::Later::Queries.delete_and_capture(Time.now).each do |job|
|
57
57
|
queue = QC::Queue.new(job["q_name"])
|
58
|
-
queue.enqueue(job["method"], *
|
58
|
+
queue.enqueue(job["method"], *MultiJson.decode(job["args"]))
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
data/queue_classic-later.gemspec
CHANGED
metadata
CHANGED
@@ -1,32 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue_classic-later
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.0.pre
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Dan Peterson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: queue_classic
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 2.1.3
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 2.1.3
|
30
27
|
description: Do things later with queue_classic
|
31
28
|
email:
|
32
29
|
- dpiddy@gmail.com
|
@@ -45,32 +42,25 @@ files:
|
|
45
42
|
- queue_classic-later.gemspec
|
46
43
|
homepage: https://github.com/dpiddy/queue_classic-later
|
47
44
|
licenses: []
|
45
|
+
metadata: {}
|
48
46
|
post_install_message:
|
49
47
|
rdoc_options: []
|
50
48
|
require_paths:
|
51
49
|
- lib
|
52
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
51
|
requirements:
|
55
|
-
- -
|
52
|
+
- - '>='
|
56
53
|
- !ruby/object:Gem::Version
|
57
54
|
version: '0'
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
hash: -1971029336602113799
|
61
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
-
none: false
|
63
56
|
requirements:
|
64
|
-
- -
|
57
|
+
- - '>'
|
65
58
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
67
|
-
segments:
|
68
|
-
- 0
|
69
|
-
hash: -1971029336602113799
|
59
|
+
version: 1.3.1
|
70
60
|
requirements: []
|
71
61
|
rubyforge_project:
|
72
|
-
rubygems_version:
|
62
|
+
rubygems_version: 2.0.3
|
73
63
|
signing_key:
|
74
|
-
specification_version:
|
64
|
+
specification_version: 4
|
75
65
|
summary: Do things later with queue_classic
|
76
66
|
test_files: []
|