Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update readme

  • Loading branch information...
commit a23ee9ccc252863b45ed3d793d7150db14f036c3 1 parent c08eeb6
@nragaz authored
Showing with 15 additions and 8 deletions.
  1. +15 −8 README.md
View
23 README.md
@@ -11,20 +11,20 @@ Usage
class User < ActiveRecord::Base
# Not needed! This is done using a hook on ActiveRecord::Base.
# include Resque::Plugins::Async::Method
-
+
def preprocess_avatar_for_a_long_time
# do stuff
end
async_method :preprocess_avatar_for_a_long_time
-
+
def send_a_very_long_email
# do stuff
end
async_method :send_a_very_long_email, queue: 'emails'
end
-
+
u = User.find(1)
-
+
u.preprocess_avatar_for_a_long_time # => queued in 'users' queue
u.send_a_very_long_email # => queued in 'emails' queue
u.sync_send_a_very_long_email # => happens right away!
@@ -37,14 +37,21 @@ Sometimes it's nice to async a method that you're including from a module:
module MyExtension
extend ActiveSupport::Concern
-
+
include Resque::Plugins::Async::Method
-
+
included do
async_method :generate_matrix, queue: 'matrices'
end
-
+
def generate_matrix
# do stuff
end
- end
+ end
+
+
+Changelog
+---------
+
+* 1.0.1: Update for latest Resque API (true returned from successful queue)
+* 1.0.0: Initial release
Please sign in to comment.
Something went wrong with that request. Please try again.