resque-async:使用resque异步调用方法的简单方法

时间:2021-05-24 14:12:14
【文件属性】:
文件名称:resque-async:使用resque异步调用方法的简单方法
文件大小:11KB
文件格式:ZIP
更新时间:2021-05-24 14:12:14
Ruby ResqueAsync 一种使用Resque异步调用方法的简单方法。 有一些宝石提供类似的功能。 但是,此实现提供了更具表现力的语法,使调用者可以控制调用。 安装 将此行添加到您的应用程序的Gemfile中: gem 'resque-async' 然后执行: $ bundle 或将其自己安装为: $ gem install resque-async 用法 假设 class MyObject < ActiveRecord :: Base def self . slow_class_method end def slow_instance_method end end 支持类方法和ActiveRecord实例方法 MyObject . async ( :high ) . slow_class_method # ActiveRecord in
【文件预览】:
resque-async-master
----.gitignore(118B)
----.rspec(30B)
----LICENSE.txt(1KB)
----spec()
--------enqueuers_spec.rb(257B)
--------support()
--------spec_helper.rb(4KB)
--------workers_spec.rb(555B)
--------module_spec.rb(167B)
--------active_record_spec.rb(187B)
----README.md(2KB)
----resque-async.gemspec(989B)
----lib()
--------resque-async.rb(303B)
--------resque-async()
----Gemfile(97B)
----Rakefile(29B)

网友评论