rq-ruby1.8 3.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/Gemfile +22 -0
  2. data/Gemfile.lock +22 -0
  3. data/INSTALL +166 -0
  4. data/LICENSE +10 -0
  5. data/Makefile +6 -0
  6. data/README +1183 -0
  7. data/Rakefile +37 -0
  8. data/TODO +24 -0
  9. data/TUTORIAL +230 -0
  10. data/VERSION +1 -0
  11. data/bin/rq +902 -0
  12. data/bin/rqmailer +865 -0
  13. data/example/a.rb +7 -0
  14. data/extconf.rb +198 -0
  15. data/gemspec.rb +40 -0
  16. data/install.rb +210 -0
  17. data/lib/rq.rb +155 -0
  18. data/lib/rq/arrayfields.rb +371 -0
  19. data/lib/rq/backer.rb +31 -0
  20. data/lib/rq/configfile.rb +82 -0
  21. data/lib/rq/configurator.rb +40 -0
  22. data/lib/rq/creator.rb +54 -0
  23. data/lib/rq/cron.rb +144 -0
  24. data/lib/rq/defaultconfig.txt +5 -0
  25. data/lib/rq/deleter.rb +51 -0
  26. data/lib/rq/executor.rb +40 -0
  27. data/lib/rq/feeder.rb +527 -0
  28. data/lib/rq/ioviewer.rb +48 -0
  29. data/lib/rq/job.rb +51 -0
  30. data/lib/rq/jobqueue.rb +947 -0
  31. data/lib/rq/jobrunner.rb +110 -0
  32. data/lib/rq/jobrunnerdaemon.rb +193 -0
  33. data/lib/rq/lister.rb +47 -0
  34. data/lib/rq/locker.rb +43 -0
  35. data/lib/rq/lockfile.rb +564 -0
  36. data/lib/rq/logging.rb +124 -0
  37. data/lib/rq/mainhelper.rb +189 -0
  38. data/lib/rq/orderedautohash.rb +39 -0
  39. data/lib/rq/orderedhash.rb +240 -0
  40. data/lib/rq/qdb.rb +733 -0
  41. data/lib/rq/querier.rb +98 -0
  42. data/lib/rq/rails.rb +80 -0
  43. data/lib/rq/recoverer.rb +28 -0
  44. data/lib/rq/refresher.rb +80 -0
  45. data/lib/rq/relayer.rb +283 -0
  46. data/lib/rq/resource.rb +22 -0
  47. data/lib/rq/resourcemanager.rb +40 -0
  48. data/lib/rq/resubmitter.rb +100 -0
  49. data/lib/rq/rotater.rb +98 -0
  50. data/lib/rq/sleepcycle.rb +46 -0
  51. data/lib/rq/snapshotter.rb +40 -0
  52. data/lib/rq/sqlite.rb +286 -0
  53. data/lib/rq/statuslister.rb +48 -0
  54. data/lib/rq/submitter.rb +113 -0
  55. data/lib/rq/toucher.rb +182 -0
  56. data/lib/rq/updater.rb +94 -0
  57. data/lib/rq/usage.rb +1222 -0
  58. data/lib/rq/util.rb +304 -0
  59. data/rdoc.sh +17 -0
  60. data/rq-ruby1.8.gemspec +120 -0
  61. data/test/.gitignore +1 -0
  62. data/test/test_rq.rb +145 -0
  63. data/white_box/crontab +2 -0
  64. data/white_box/joblist +8 -0
  65. data/white_box/killrq +18 -0
  66. data/white_box/rq_killer +27 -0
  67. metadata +208 -0
@@ -0,0 +1,2 @@
1
+ */5 * * * * (/dmsp/reference/bin/ruby /dmsp/moby-1-1/ahoward/shared/eg/ruby/rq/rq-0.1.5/bin/rq /dmsp/moby-1-1/ahoward/shared/eg/ruby/rq/rq-0.1.5/q feed -d -l/home/ahoward/cfq.log -v4 -q) >>/home/ahoward/cfq.oe 2>&1
2
+
@@ -0,0 +1,8 @@
1
+ echo 42 && sleep 2
2
+ echo 42 && sleep 2
3
+ echo 42 && sleep 2
4
+ echo 42 && sleep 2
5
+ echo 42 && sleep 2
6
+ echo 42 && sleep 2
7
+ echo 42 && sleep 2
8
+ echo 42 && sleep 2
@@ -0,0 +1,18 @@
1
+ #!/dmsp/reference/bin/ruby
2
+ STDOUT.sync = true
3
+ $VERBOSE=nil
4
+ require 'posixlock'
5
+ q = ARGV.shift || 'q'
6
+ begin
7
+ open("#{ q }/lock",'r+') do |f|
8
+ puts 'locking...'
9
+ #f.lockf File::F_LOCK, 0
10
+ (locked=f.lockf(File::F_TLOCK, 0)) until locked
11
+ system "touch -B 3600 q/lock"
12
+ puts 'locked <enter> to unlock...'
13
+ STDIN.gets
14
+ end
15
+ puts 'un-locked'
16
+ rescue => e
17
+ p e
18
+ end
@@ -0,0 +1,27 @@
1
+ #!/dmsp/reference/bin/ruby
2
+ STDOUT.sync = true
3
+ $VERBOSE=nil
4
+ require 'posixlock'
5
+ sec = 8
6
+ loopno = 0
7
+ loop do
8
+ begin
9
+ open('q/lock','r+') do |f|
10
+ puts 'locking...'
11
+ #f.lockf File::F_LOCK, 0
12
+ (locked=f.lockf(File::F_TLOCK, 0)) or sleep(1 + rand) until locked
13
+ #locked = f.lockf(File::F_TLOCK, 0) until locked
14
+ system "touch -B 3600 q/lock"
15
+ puts 'locked'
16
+ sleep(30)
17
+ end
18
+ puts 'un-locked'
19
+ #sleep((2 * sec) + rand(42))
20
+ #sleep(sec + rand(sec))
21
+ sleep 300
22
+ rescue => e
23
+ p e
24
+ end
25
+ puts loopno
26
+ loopno += 1
27
+ end
metadata ADDED
@@ -0,0 +1,208 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rq-ruby1.8
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
+ prerelease: false
6
+ segments:
7
+ - 3
8
+ - 4
9
+ - 3
10
+ version: 3.4.3
11
+ platform: ruby
12
+ authors:
13
+ - Pjotr Prins
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-07-21 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ type: :runtime
23
+ prerelease: false
24
+ name: posixlock
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 3
31
+ segments:
32
+ - 0
33
+ version: "0"
34
+ requirement: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ type: :runtime
37
+ prerelease: false
38
+ name: arrayfields
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ requirement: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ type: :runtime
51
+ prerelease: false
52
+ name: lockfile
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ requirement: *id003
63
+ - !ruby/object:Gem::Dependency
64
+ type: :development
65
+ prerelease: false
66
+ name: bundler
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ~>
71
+ - !ruby/object:Gem::Version
72
+ hash: 9
73
+ segments:
74
+ - 1
75
+ - 0
76
+ - 15
77
+ version: 1.0.15
78
+ requirement: *id004
79
+ - !ruby/object:Gem::Dependency
80
+ type: :development
81
+ prerelease: false
82
+ name: jeweler
83
+ version_requirements: &id005 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ~>
87
+ - !ruby/object:Gem::Version
88
+ hash: 7
89
+ segments:
90
+ - 1
91
+ - 6
92
+ - 4
93
+ version: 1.6.4
94
+ requirement: *id005
95
+ description: Zero configuration job scheduler for computer clusters
96
+ email: pjotr.public01@thebird.nl
97
+ executables:
98
+ - rqmailer
99
+ - rq
100
+ extensions: []
101
+
102
+ extra_rdoc_files:
103
+ - LICENSE
104
+ - README
105
+ - TODO
106
+ files:
107
+ - Gemfile
108
+ - Gemfile.lock
109
+ - INSTALL
110
+ - LICENSE
111
+ - Makefile
112
+ - README
113
+ - Rakefile
114
+ - TODO
115
+ - TUTORIAL
116
+ - VERSION
117
+ - bin/rq
118
+ - bin/rqmailer
119
+ - example/a.rb
120
+ - extconf.rb
121
+ - gemspec.rb
122
+ - install.rb
123
+ - lib/rq.rb
124
+ - lib/rq/arrayfields.rb
125
+ - lib/rq/backer.rb
126
+ - lib/rq/configfile.rb
127
+ - lib/rq/configurator.rb
128
+ - lib/rq/creator.rb
129
+ - lib/rq/cron.rb
130
+ - lib/rq/defaultconfig.txt
131
+ - lib/rq/deleter.rb
132
+ - lib/rq/executor.rb
133
+ - lib/rq/feeder.rb
134
+ - lib/rq/ioviewer.rb
135
+ - lib/rq/job.rb
136
+ - lib/rq/jobqueue.rb
137
+ - lib/rq/jobrunner.rb
138
+ - lib/rq/jobrunnerdaemon.rb
139
+ - lib/rq/lister.rb
140
+ - lib/rq/locker.rb
141
+ - lib/rq/lockfile.rb
142
+ - lib/rq/logging.rb
143
+ - lib/rq/mainhelper.rb
144
+ - lib/rq/orderedautohash.rb
145
+ - lib/rq/orderedhash.rb
146
+ - lib/rq/qdb.rb
147
+ - lib/rq/querier.rb
148
+ - lib/rq/rails.rb
149
+ - lib/rq/recoverer.rb
150
+ - lib/rq/refresher.rb
151
+ - lib/rq/relayer.rb
152
+ - lib/rq/resource.rb
153
+ - lib/rq/resourcemanager.rb
154
+ - lib/rq/resubmitter.rb
155
+ - lib/rq/rotater.rb
156
+ - lib/rq/sleepcycle.rb
157
+ - lib/rq/snapshotter.rb
158
+ - lib/rq/sqlite.rb
159
+ - lib/rq/statuslister.rb
160
+ - lib/rq/submitter.rb
161
+ - lib/rq/toucher.rb
162
+ - lib/rq/updater.rb
163
+ - lib/rq/usage.rb
164
+ - lib/rq/util.rb
165
+ - rdoc.sh
166
+ - rq-ruby1.8.gemspec
167
+ - test/.gitignore
168
+ - test/test_rq.rb
169
+ - white_box/crontab
170
+ - white_box/joblist
171
+ - white_box/killrq
172
+ - white_box/rq_killer
173
+ has_rdoc: true
174
+ homepage: http://github.com/pjotrp/rq
175
+ licenses:
176
+ - BSD
177
+ post_install_message:
178
+ rdoc_options: []
179
+
180
+ require_paths:
181
+ - lib
182
+ required_ruby_version: !ruby/object:Gem::Requirement
183
+ none: false
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ hash: 3
188
+ segments:
189
+ - 0
190
+ version: "0"
191
+ required_rubygems_version: !ruby/object:Gem::Requirement
192
+ none: false
193
+ requirements:
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ hash: 3
197
+ segments:
198
+ - 0
199
+ version: "0"
200
+ requirements: []
201
+
202
+ rubyforge_project:
203
+ rubygems_version: 1.3.7
204
+ signing_key:
205
+ specification_version: 3
206
+ summary: Ruby Queue scheduler
207
+ test_files: []
208
+