Sha256: 4f4e454c060c5070ac7e2980faff247f6e427d2af12dd01bd87699304f9e48f7
Contents?: true
Size: 535 Bytes
Versions: 4
Compression:
Stored size: 535 Bytes
Contents
module Asynchronic class Job def initialize(process) @process = process end def params @process.params end def result(reference) @process[reference].result end def self.queue(name=nil) name ? @queue = name : @queue end def self.enqueue(params={}) process = Asynchronic.environment.create_process self, params process.enqueue process.id end private def async(type, params={}) @process.nest type, params nil end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
asynchronic-0.2.3 | lib/asynchronic/job.rb |
asynchronic-0.2.2 | lib/asynchronic/job.rb |
asynchronic-0.2.1 | lib/asynchronic/job.rb |
asynchronic-0.2.0 | lib/asynchronic/job.rb |