You are here: Browse Railsplugins Tkueue
Plugin to enqueue class methods and tasks calls
You need to create the tkueue table. To make it easy, there are two convenient methods in the Tkueue model: Tkueue.migrate_up and Tkueue.migrate_down
You can execute them standalone from the rails console or create a migration calling those methods from the migration’s up and down methods.
To put a mail in the queue, call the Tkueue.add method. The signature of the method is Tkueue.add(class_name,method_name, *params)
You have to provide the class_name (nil if you want to enqueue a rake task), the name of the method/task and optionally a variable number of parameters for the notifier method
The params will be serialized into a String before going to the db, so they must be serializable via Marshal.
Creating the callable methods is your responsability. Tkueue will directly invoke your methods with all the parameters specified
Copyright© 2008 javier ramirez, released under the MIT license
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly