Permalink
Browse files

port to stalker

  • Loading branch information...
adamwiggins committed Apr 17, 2010
1 parent e965803 commit f443f03e43719bc3521c459f7ea32c18b7dcf855
Showing with 4,245 additions and 19,459 deletions.
  1. +1 −1 app/models/feed.rb
  2. +2 −4 config/environment.rb
  3. +1 −1 worker.rb → jobs.rb
  4. +95 −0 vendor/gems/beanstalk-client-1.0.2/.specification
  5. +57 −0 vendor/gems/beanstalk-client-1.0.2/History.txt
  6. +674 −0 vendor/gems/beanstalk-client-1.0.2/License.txt
  7. +27 −0 vendor/gems/beanstalk-client-1.0.2/Manifest.txt
  8. +1 −0 vendor/gems/beanstalk-client-1.0.2/README.txt
  9. +4 −0 vendor/gems/beanstalk-client-1.0.2/Rakefile
  10. +72 −0 vendor/gems/beanstalk-client-1.0.2/config/hoe.rb
  11. +17 −0 vendor/gems/beanstalk-client-1.0.2/config/requirements.rb
  12. +26 −0 vendor/gems/beanstalk-client-1.0.2/lib/beanstalk-client.rb
  13. +397 −0 vendor/gems/beanstalk-client-1.0.2/lib/beanstalk-client/connection.rb
  14. +88 −0 vendor/gems/beanstalk-client-1.0.2/lib/beanstalk-client/errors.rb
  15. +94 −0 vendor/gems/beanstalk-client-1.0.2/lib/beanstalk-client/job.rb
  16. +5 −0 vendor/gems/beanstalk-client-1.0.2/lib/beanstalk-client/version.rb
  17. 0 vendor/gems/beanstalk-client-1.0.2/log/debug.log
  18. +14 −0 vendor/gems/beanstalk-client-1.0.2/script/destroy
  19. +14 −0 vendor/gems/beanstalk-client-1.0.2/script/generate
  20. +74 −0 vendor/gems/beanstalk-client-1.0.2/script/txt2html
  21. +1,585 −0 vendor/gems/beanstalk-client-1.0.2/setup.rb
  22. +34 −0 vendor/gems/beanstalk-client-1.0.2/tasks/deployment.rake
  23. +7 −0 vendor/gems/beanstalk-client-1.0.2/tasks/environment.rake
  24. +17 −0 vendor/gems/beanstalk-client-1.0.2/tasks/website.rake
  25. +12 −0 vendor/gems/beanstalk-client-1.0.2/test/test_beanstalk-client.rb
  26. +2 −0 vendor/gems/beanstalk-client-1.0.2/test/test_helper.rb
  27. +145 −0 vendor/gems/beanstalk-client-1.0.2/website/index.html
  28. +79 −0 vendor/gems/beanstalk-client-1.0.2/website/index.txt
  29. +285 −0 vendor/gems/beanstalk-client-1.0.2/website/javascripts/rounded_corners_lite.inc.js
  30. +138 −0 vendor/gems/beanstalk-client-1.0.2/website/stylesheets/screen.css
  31. +48 −0 vendor/gems/beanstalk-client-1.0.2/website/template.rhtml
  32. +0 −100 vendor/gems/bunny-0.5.3/.specification
  33. +0 −20 vendor/gems/bunny-0.5.3/LICENSE
  34. +0 −59 vendor/gems/bunny-0.5.3/README
  35. +0 −24 vendor/gems/bunny-0.5.3/Rakefile
  36. +0 −60 vendor/gems/bunny-0.5.3/bunny.gemspec
  37. +0 −30 vendor/gems/bunny-0.5.3/examples/simple_08.rb
  38. +0 −30 vendor/gems/bunny-0.5.3/examples/simple_09.rb
  39. +0 −33 vendor/gems/bunny-0.5.3/examples/simple_ack_08.rb
  40. +0 −33 vendor/gems/bunny-0.5.3/examples/simple_ack_09.rb
  41. +0 −61 vendor/gems/bunny-0.5.3/examples/simple_consumer_08.rb
  42. +0 −61 vendor/gems/bunny-0.5.3/examples/simple_consumer_09.rb
  43. +0 −39 vendor/gems/bunny-0.5.3/examples/simple_fanout_08.rb
  44. +0 −39 vendor/gems/bunny-0.5.3/examples/simple_fanout_09.rb
  45. +0 −40 vendor/gems/bunny-0.5.3/examples/simple_headers_08.rb
  46. +0 −40 vendor/gems/bunny-0.5.3/examples/simple_headers_09.rb
  47. +0 −27 vendor/gems/bunny-0.5.3/examples/simple_publisher_08.rb
  48. +0 −27 vendor/gems/bunny-0.5.3/examples/simple_publisher_09.rb
  49. +0 −59 vendor/gems/bunny-0.5.3/examples/simple_topic_08.rb
  50. +0 −59 vendor/gems/bunny-0.5.3/examples/simple_topic_09.rb
  51. +0 −79 vendor/gems/bunny-0.5.3/lib/bunny.rb
  52. +0 −33 vendor/gems/bunny-0.5.3/lib/bunny/channel08.rb
  53. +0 −33 vendor/gems/bunny-0.5.3/lib/bunny/channel09.rb
  54. +0 −451 vendor/gems/bunny-0.5.3/lib/bunny/client08.rb
  55. +0 −420 vendor/gems/bunny-0.5.3/lib/bunny/client09.rb
  56. +0 −163 vendor/gems/bunny-0.5.3/lib/bunny/exchange08.rb
  57. +0 −164 vendor/gems/bunny-0.5.3/lib/bunny/exchange09.rb
  58. +0 −447 vendor/gems/bunny-0.5.3/lib/bunny/queue08.rb
  59. +0 −457 vendor/gems/bunny-0.5.3/lib/bunny/queue09.rb
  60. +0 −18 vendor/gems/bunny-0.5.3/lib/qrack/channel.rb
  61. +0 −185 vendor/gems/bunny-0.5.3/lib/qrack/client.rb
  62. +0 −132 vendor/gems/bunny-0.5.3/lib/qrack/protocol/protocol08.rb
  63. +0 −133 vendor/gems/bunny-0.5.3/lib/qrack/protocol/protocol09.rb
  64. +0 −822 vendor/gems/bunny-0.5.3/lib/qrack/protocol/spec08.rb
  65. +0 −520 vendor/gems/bunny-0.5.3/lib/qrack/protocol/spec09.rb
  66. +0 −22 vendor/gems/bunny-0.5.3/lib/qrack/qrack08.rb
  67. +0 −22 vendor/gems/bunny-0.5.3/lib/qrack/qrack09.rb
  68. +0 −53 vendor/gems/bunny-0.5.3/lib/qrack/queue.rb
  69. +0 −276 vendor/gems/bunny-0.5.3/lib/qrack/transport/buffer08.rb
  70. +0 −276 vendor/gems/bunny-0.5.3/lib/qrack/transport/buffer09.rb
  71. +0 −112 vendor/gems/bunny-0.5.3/lib/qrack/transport/frame08.rb
  72. +0 −94 vendor/gems/bunny-0.5.3/lib/qrack/transport/frame09.rb
  73. +0 −59 vendor/gems/bunny-0.5.3/spec/spec_08/bunny_spec.rb
  74. +0 −146 vendor/gems/bunny-0.5.3/spec/spec_08/exchange_spec.rb
  75. +0 −132 vendor/gems/bunny-0.5.3/spec/spec_08/queue_spec.rb
  76. +0 −59 vendor/gems/bunny-0.5.3/spec/spec_09/bunny_spec.rb
  77. +0 −146 vendor/gems/bunny-0.5.3/spec/spec_09/exchange_spec.rb
  78. +0 −132 vendor/gems/bunny-0.5.3/spec/spec_09/queue_spec.rb
  79. +0 −2 vendor/gems/minion-0.1.5/.gitignore
  80. +0 −56 vendor/gems/minion-0.1.5/.specification
  81. +0 −94 vendor/gems/minion-0.1.5/README.rdoc
  82. +0 −1 vendor/gems/minion-0.1.5/VERSION
  83. +0 −33 vendor/gems/minion-0.1.5/examples/math.rb
  84. +0 −25 vendor/gems/minion-0.1.5/examples/sandwich.rb
  85. +0 −25 vendor/gems/minion-0.1.5/examples/when.rb
  86. +0 −132 vendor/gems/minion-0.1.5/lib/minion.rb
  87. +0 −30 vendor/gems/minion-0.1.5/lib/minion/handler.rb
  88. +0 −57 vendor/gems/minion-0.1.5/minion.gemspec
  89. +79 −0 vendor/gems/stalker-0.2.0/.specification
  90. +18 −0 vendor/gems/stalker-0.2.0/Rakefile
  91. +1 −0 vendor/gems/stalker-0.2.0/VERSION
  92. +16 −0 vendor/gems/stalker-0.2.0/bin/stalk
  93. +5 −0 vendor/gems/stalker-0.2.0/examples/enqueue.rb
  94. +16 −0 vendor/gems/stalker-0.2.0/examples/jobs.rb
  95. +95 −0 vendor/gems/stalker-0.2.0/lib/stalker.rb
  96. +0 −122 vendor/gems/tmm1-amqp-0.6.4/.specification
  97. +0 −128 vendor/gems/tmm1-amqp-0.6.4/README
  98. +0 −15 vendor/gems/tmm1-amqp-0.6.4/Rakefile
  99. +0 −83 vendor/gems/tmm1-amqp-0.6.4/amqp.gemspec
  100. +0 −32 vendor/gems/tmm1-amqp-0.6.4/amqp.todo
  101. +0 −2 vendor/gems/tmm1-amqp-0.6.4/doc/EXAMPLE_01_PINGPONG
  102. +0 −2 vendor/gems/tmm1-amqp-0.6.4/doc/EXAMPLE_02_CLOCK
  103. +0 −2 vendor/gems/tmm1-amqp-0.6.4/doc/EXAMPLE_03_STOCKS
  104. +0 −2 vendor/gems/tmm1-amqp-0.6.4/doc/EXAMPLE_04_MULTICLOCK
  105. +0 −2 vendor/gems/tmm1-amqp-0.6.4/doc/EXAMPLE_05_ACK
  106. +0 −2 vendor/gems/tmm1-amqp-0.6.4/doc/EXAMPLE_05_POP
  107. +0 −2 vendor/gems/tmm1-amqp-0.6.4/doc/EXAMPLE_06_HASHTABLE
  108. +0 −79 vendor/gems/tmm1-amqp-0.6.4/examples/amqp/simple.rb
  109. +0 −45 vendor/gems/tmm1-amqp-0.6.4/examples/mq/ack.rb
  110. +0 −56 vendor/gems/tmm1-amqp-0.6.4/examples/mq/clock.rb
  111. +0 −52 vendor/gems/tmm1-amqp-0.6.4/examples/mq/hashtable.rb
  112. +0 −49 vendor/gems/tmm1-amqp-0.6.4/examples/mq/internal.rb
  113. +0 −88 vendor/gems/tmm1-amqp-0.6.4/examples/mq/logger.rb
  114. +0 −49 vendor/gems/tmm1-amqp-0.6.4/examples/mq/multiclock.rb
  115. +0 −45 vendor/gems/tmm1-amqp-0.6.4/examples/mq/pingpong.rb
  116. +0 −43 vendor/gems/tmm1-amqp-0.6.4/examples/mq/pop.rb
  117. +0 −19 vendor/gems/tmm1-amqp-0.6.4/examples/mq/primes-simple.rb
  118. +0 −99 vendor/gems/tmm1-amqp-0.6.4/examples/mq/primes.rb
  119. +0 −58 vendor/gems/tmm1-amqp-0.6.4/examples/mq/stocks.rb
  120. +0 −115 vendor/gems/tmm1-amqp-0.6.4/lib/amqp.rb
  121. +0 −395 vendor/gems/tmm1-amqp-0.6.4/lib/amqp/buffer.rb
  122. +0 −210 vendor/gems/tmm1-amqp-0.6.4/lib/amqp/client.rb
  123. +0 −124 vendor/gems/tmm1-amqp-0.6.4/lib/amqp/frame.rb
  124. +0 −212 vendor/gems/tmm1-amqp-0.6.4/lib/amqp/protocol.rb
  125. +0 −99 vendor/gems/tmm1-amqp-0.6.4/lib/amqp/server.rb
  126. +0 −832 vendor/gems/tmm1-amqp-0.6.4/lib/amqp/spec.rb
  127. +0 −7 vendor/gems/tmm1-amqp-0.6.4/lib/ext/blankslate.rb
  128. +0 −51 vendor/gems/tmm1-amqp-0.6.4/lib/ext/em.rb
  129. +0 −69 vendor/gems/tmm1-amqp-0.6.4/lib/ext/emfork.rb
  130. +0 −823 vendor/gems/tmm1-amqp-0.6.4/lib/mq.rb
  131. +0 −302 vendor/gems/tmm1-amqp-0.6.4/lib/mq/exchange.rb
  132. +0 −33 vendor/gems/tmm1-amqp-0.6.4/lib/mq/header.rb
  133. +0 −89 vendor/gems/tmm1-amqp-0.6.4/lib/mq/logger.rb
  134. +0 −433 vendor/gems/tmm1-amqp-0.6.4/lib/mq/queue.rb
  135. +0 −100 vendor/gems/tmm1-amqp-0.6.4/lib/mq/rpc.rb
  136. +0 −30 vendor/gems/tmm1-amqp-0.6.4/old/README
  137. +0 −12 vendor/gems/tmm1-amqp-0.6.4/old/Rakefile
  138. +0 −606 vendor/gems/tmm1-amqp-0.6.4/old/amqp-0.8.json
  139. +0 −796 vendor/gems/tmm1-amqp-0.6.4/old/amqp_spec.rb
  140. +0 −695 vendor/gems/tmm1-amqp-0.6.4/old/amqpc.rb
  141. +0 −148 vendor/gems/tmm1-amqp-0.6.4/old/codegen.rb
  142. +0 −617 vendor/gems/tmm1-amqp-0.6.4/protocol/amqp-0.8.json
  143. +0 −3,908 vendor/gems/tmm1-amqp-0.6.4/protocol/amqp-0.8.xml
  144. +0 −173 vendor/gems/tmm1-amqp-0.6.4/protocol/codegen.rb
  145. +0 −281 vendor/gems/tmm1-amqp-0.6.4/protocol/doc.txt
  146. +0 −88 vendor/gems/tmm1-amqp-0.6.4/research/api.rb
  147. +0 −63 vendor/gems/tmm1-amqp-0.6.4/research/primes-forked.rb
  148. +0 −135 vendor/gems/tmm1-amqp-0.6.4/research/primes-processes.rb
  149. +0 −49 vendor/gems/tmm1-amqp-0.6.4/research/primes-threaded.rb
View
@@ -4,7 +4,7 @@ class Feed < ActiveRecord::Base
after_create :fetch
def self.enqueue(url)
Minion.enqueue('feed.fetch', :url => url)
Stalker.enqueue('feed.fetch', :url => url)
end
def fetch
View
@@ -1,11 +1,9 @@
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = '2.3.5'
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
config.time_zone = 'UTC'
config.gem 'feedtools', :lib => 'feed_tools'
config.gem 'tmm1-amqp', :lib => 'mq', :source => 'http://gems.github.com'
config.gem 'bunny'
config.gem 'minion'
config.gem 'stalker'
end
View
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/config/environment'
include Minion
include Stalker
job 'feed.fetch' do |args|
feed = Feed.find_or_new(args['url'])
@@ -0,0 +1,95 @@
--- !ruby/object:Gem::Specification
name: beanstalk-client
version: !ruby/object:Gem::Version
prerelease: false
segments:
- 1
- 0
- 2
version: 1.0.2
platform: ruby
authors:
- Keith Rarick
autorequire:
bindir: bin
cert_chain:
date: 2008-06-18 00:00:00 -07:00
default_executable:
dependencies: []
description: Ruby client library for the Beanstalk protocol
email: kr@causes.com
executables: []
extensions: []
extra_rdoc_files:
- History.txt
- License.txt
- Manifest.txt
- README.txt
- website/index.txt
files:
- History.txt
- License.txt
- Manifest.txt
- README.txt
- Rakefile
- config/hoe.rb
- config/requirements.rb
- lib/beanstalk-client.rb
- lib/beanstalk-client/connection.rb
- lib/beanstalk-client/errors.rb
- lib/beanstalk-client/job.rb
- lib/beanstalk-client/version.rb
- log/debug.log
- script/destroy
- script/generate
- script/txt2html
- setup.rb
- tasks/deployment.rake
- tasks/environment.rake
- tasks/website.rake
- test/test_beanstalk-client.rb
- test/test_helper.rb
- website/index.html
- website/index.txt
- website/javascripts/rounded_corners_lite.inc.js
- website/stylesheets/screen.css
- website/template.rhtml
has_rdoc: true
homepage: http://beanstalk.rubyforge.org
licenses: []
post_install_message:
rdoc_options:
- --main
- README.txt
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - ">"
- !ruby/object:Gem::Version
segments:
- 0
- 0
- 0
version: 0.0.0
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
segments:
- 0
version: "0"
requirements: []
rubyforge_project: beanstalk
rubygems_version: 1.3.6
signing_key:
specification_version: 1
summary: Ruby client library for the Beanstalk protocol
test_files:
- test/test_beanstalk-client.rb
- test/test_helper.rb
@@ -0,0 +1,57 @@
== 1.0.2 2008-06-18
* Support reserve-with-timeout on pools. (Dustin Sallings)
== 1.0.1 (never released)
* Fix bug preventing jobs from being deleted.
* Remove an extraneous message. (Dustin Sallings)
* Fix the github gemspec so beanstalk-client builds. (Isaac Feliu)
* Support the new reserve-with-timeout command in dev beanstalkd.
(Dustin Sallings)
== 1.0.0 2008-05-29
* Preserve the watch list when a Pool instance reconnects.
* Allow user to get the cached list of tubes watched for a Pool.
* Allow user to specify a default tube for all connections. (Dustin Sallings)
* Added a gemspec for github. (Dustin Sallings)
* More exception classes, including one for each server error response.
== 0.11.0 2008-04-17
* Fix an infinite loop bug when the server goes away.
== 0.10.0 2008-04-11
* Some optimizations to avoid sending unnecessary use and watch commands.
* Use newer protocol features to open only one connection per server address.
* More consistent and complete peek methods.
* Various bug fixes.
== 0.9.0 2008-02-27
* Skipping 0.8.x; beanstalkd 0.8 was a botched release.
* Protocol updates, support for all new commands and changes to existing
commands.
* Bugfix: don't add stats values that aren't aggregations already.
== 0.7.0 2008-02-01
* Add a close method to connections and pools.
* Add a last_server method to identify the last connection used.
== 0.6.1 2008-01-22
* More useful behavior when we lose the connection or the server is in drain
mode.
== 0.6.0 2008-01-04
* Protocol updates. Works with beanstalkd 0.6.
* Some bugfixes and better robustness.
* Convenience methods for accessing YAML job hash elements.
== 0.1 2007-12-12
* Initial release
Oops, something went wrong.

0 comments on commit f443f03

Please sign in to comment.