jerefrer-resque 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.kick +26 -0
  2. data/HISTORY.md +10 -0
  3. data/LICENSE +20 -0
  4. data/README.markdown +703 -0
  5. data/Rakefile +61 -0
  6. data/bin/resque +69 -0
  7. data/bin/resque-web +47 -0
  8. data/config.ru +8 -0
  9. data/deps.rip +5 -0
  10. data/examples/async_helper.rb +31 -0
  11. data/examples/demo/README.markdown +71 -0
  12. data/examples/demo/Rakefile +3 -0
  13. data/examples/demo/app.rb +27 -0
  14. data/examples/demo/config.ru +19 -0
  15. data/examples/demo/job.rb +12 -0
  16. data/examples/god/resque.god +52 -0
  17. data/examples/god/stale.god +26 -0
  18. data/examples/instance.rb +11 -0
  19. data/examples/simple.rb +30 -0
  20. data/init.rb +1 -0
  21. data/lib/resque/errors.rb +7 -0
  22. data/lib/resque/failure/base.rb +58 -0
  23. data/lib/resque/failure/hoptoad.rb +88 -0
  24. data/lib/resque/failure/redis.rb +33 -0
  25. data/lib/resque/failure.rb +63 -0
  26. data/lib/resque/helpers.rb +57 -0
  27. data/lib/resque/job.rb +91 -0
  28. data/lib/resque/server/public/idle.png +0 -0
  29. data/lib/resque/server/public/jquery-1.3.2.min.js +19 -0
  30. data/lib/resque/server/public/jquery.relatize_date.js +95 -0
  31. data/lib/resque/server/public/poll.png +0 -0
  32. data/lib/resque/server/public/ranger.js +21 -0
  33. data/lib/resque/server/public/reset.css +48 -0
  34. data/lib/resque/server/public/style.css +75 -0
  35. data/lib/resque/server/public/working.png +0 -0
  36. data/lib/resque/server/views/error.erb +1 -0
  37. data/lib/resque/server/views/failed.erb +35 -0
  38. data/lib/resque/server/views/key.erb +17 -0
  39. data/lib/resque/server/views/layout.erb +41 -0
  40. data/lib/resque/server/views/next_more.erb +10 -0
  41. data/lib/resque/server/views/overview.erb +4 -0
  42. data/lib/resque/server/views/queues.erb +46 -0
  43. data/lib/resque/server/views/stats.erb +62 -0
  44. data/lib/resque/server/views/workers.erb +78 -0
  45. data/lib/resque/server/views/working.erb +67 -0
  46. data/lib/resque/server.rb +174 -0
  47. data/lib/resque/stat.rb +53 -0
  48. data/lib/resque/tasks.rb +24 -0
  49. data/lib/resque/version.rb +3 -0
  50. data/lib/resque/worker.rb +406 -0
  51. data/lib/resque.rb +184 -0
  52. data/tasks/redis.rake +125 -0
  53. data/tasks/resque.rake +2 -0
  54. data/test/redis-test.conf +132 -0
  55. data/test/resque_test.rb +160 -0
  56. data/test/test_helper.rb +90 -0
  57. data/test/worker_test.rb +220 -0
  58. metadata +121 -0
data/.kick ADDED
@@ -0,0 +1,26 @@
1
+ # take control of the growl notifications
2
+ module GrowlHacks
3
+ def growl(type, subject, body, *args, &block)
4
+ case type
5
+ when Kicker::GROWL_NOTIFICATIONS[:succeeded]
6
+ puts subject = "Success"
7
+ body = body.split("\n").last
8
+ when Kicker::GROWL_NOTIFICATIONS[:failed]
9
+ subject = "Failure"
10
+ puts body
11
+ body = body.split("\n").last
12
+ else
13
+ return nil
14
+ end
15
+ super(type, subject, body, *args, &block)
16
+ end
17
+ end
18
+
19
+ Kicker.send :extend, GrowlHacks
20
+
21
+ # no logging
22
+ Kicker::Utils.module_eval do
23
+ def log(message)
24
+ nil
25
+ end
26
+ end
data/HISTORY.md ADDED
@@ -0,0 +1,10 @@
1
+ ## 1.1.0 (2009-11-04)
2
+
3
+ * Bugfix: Broken ERB tag in failure UI
4
+ * Bugfix: Save the worker's ID, not the worker itself, in the failure module
5
+ * Redesigned the sinatra web interface
6
+ * Added option to clear failed jobs
7
+
8
+ ## 1.0.0 (2009-11-03)
9
+
10
+ * First release.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Chris Wanstrath
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.