Sha256: 39e9c0c4d19691d18e8879b254f8fc7be463ba98ae4516b73687aad6e29c3af5

Contents?: true

Size: 544 Bytes

Versions: 48

Compression:

Stored size: 544 Bytes

Contents

module Spider; module Worker
    
    class Job < Spider::Model::Managed
        element :uuid, UUID
        element :description, String
        element :time, DateTime
        element :task, String
        element :status, {
            'done' => 'Done', 'failed' => 'Failed'
        }
        
        def run
            Spider.logger.debug("Running job #{self.uuid}")
            t = self.task.untaint
            Thread.start{
                $SAFE = 3
                eval(t)
            }.join
        end
        
    end
    
end; end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
spiderfw-1.0.1 apps/worker/models/job.rb
spiderfw-1.0.0 apps/worker/models/job.rb
spiderfw-0.6.39 apps/worker/models/job.rb
spiderfw-0.6.38 apps/worker/models/job.rb
spiderfw-0.6.37 apps/worker/models/job.rb
spiderfw-0.6.35 apps/worker/models/job.rb
spiderfw-0.6.34 apps/worker/models/job.rb
spiderfw-0.6.33 apps/worker/models/job.rb
spiderfw-0.6.32 apps/worker/models/job.rb
spiderfw-0.6.31 apps/worker/models/job.rb
spiderfw-0.6.30 apps/worker/models/job.rb
spiderfw-0.6.29 apps/worker/models/job.rb
spiderfw-0.6.28 apps/worker/models/job.rb
spiderfw-0.6.27 apps/worker/models/job.rb
spiderfw-0.6.26 apps/worker/models/job.rb
spiderfw-0.6.26.pre1 apps/worker/models/job.rb
spiderfw-0.6.25 apps/worker/models/job.rb
spiderfw-0.6.24 apps/worker/models/job.rb
spiderfw-0.6.23 apps/worker/models/job.rb
spiderfw-0.6.22 apps/worker/models/job.rb