<commit_before>= Resque Queueable

== Overview

This gem extends ActiveRecord and Resque to add an automatic queue to any persisted model. Simply mark the model as 'queueable' and then call methods on the queue.

Assumption is that you have a working knowledge of Resque, because it is awesome:

[http://github.com/defunkt/resque](http://github.com/defunkt/resque)

To get it, just drop in the gem and you're good to go:

  gem 'resque-queueable', :git => "http://github.com/kimos/resque-queueable"


== Example Usage

The following is the old boring way:

  class Pie < ActiveRecord::Base
    def describe(adj)
      "This pie is #{adj}"
    end

    def async_describe(adj)
      Resque.enque(self.class, self.id, :describe, adj)
    end

    def self.perform(id, method, *args)
      self.find(id).send(method, args)
    end
  end

  Pie.last.async_describe "delicious"

It can be replaced with:

  class Pie < ActiveRecord::Base
    queueable

    def describe(adj)
      "This pie is #{adj}"
    end
  end

  Pie.last.queue.describe "delicious"

Shiny.


== The Usual

Author: Kevin McPhillips - [<EMAIL>](mailto:<EMAIL>)<commit_msg>Markdown and rdoc have different syntax!<commit_after>= Resque Queueable

== Overview

This gem extends ActiveRecord and Resque to add an automatic queue to any persisted model. Simply mark the model as 'queueable' and then call methods on the queue.

Assumption is that you have a working knowledge of Resque, because it is awesome:

http://github.com/defunkt/resque

To get it, just drop in the gem and you're good to go:

  gem 'resque-queueable', :git => "http://github.com/kimos/resque-queueable"


== Example Usage

The following is the old boring way:

  class Pie < ActiveRecord::Base
    def describe(adj)
      "This pie is #{adj}"
    end

    def async_describe(adj)
      Resque.enque(self.class, self.id, :describe, adj)
    end

    def self.perform(id, method, *args)
      self.find(id).send(method, args)
    end
  end

  Pie.last.async_describe "delicious"

It can be replaced with:

  class Pie < ActiveRecord::Base
    queueable

    def describe(adj)
      "This pie is #{adj}"
    end
  end

  Pie.last.queue.describe "delicious"

Shiny.


== The Usual

Author: <NAME> - <EMAIL>
{'fraction_non_alphanumeric': 0.09915140687807057, 'fraction_numerical': 0.0, 'mean_word_length': 3.324324324324324, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4346707', 'n_tokens_mistral': 752, 'n_tokens_neox': 711, 'n_words': 255}