Module: Cosmo::Job

Included in:
ActiveJobAdapter::Executor
Defined in:
lib/cosmo/job.rb,
lib/cosmo/job/data.rb,
lib/cosmo/job/limit.rb,
lib/cosmo/job/processor.rb,
sig/cosmo/job.rbs,
sig/cosmo/job/data.rbs,
sig/cosmo/job/limit.rbs,
sig/cosmo/job/processor.rbs

Defined Under Namespace

Modules: ClassMethods Classes: Data, Limit, Processor

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attempt::Integer?

Returns the value of attribute attempt.

Returns:

  • (::Integer, nil)


113
114
115
# File 'lib/cosmo/job.rb', line 113

def attempt
  @attempt
end

#enqueued_at::Time?

Returns the value of attribute enqueued_at.

Returns:

  • (::Time, nil)


113
114
115
# File 'lib/cosmo/job.rb', line 113

def enqueued_at
  @enqueued_at
end

#jid::String

Returns the value of attribute jid.

Returns:

  • (::String)


113
114
115
# File 'lib/cosmo/job.rb', line 113

def jid
  @jid
end

#scheduled_by::String?

Returns the value of attribute scheduled_by.

Returns:

  • (::String, nil)


113
114
115
# File 'lib/cosmo/job.rb', line 113

def scheduled_by
  @scheduled_by
end

Class Method Details

.included(base) ⇒ void

This method returns an undefined value.

Parameters:

  • base (Class)


9
10
11
# File 'lib/cosmo/job.rb', line 9

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#loggerObject

Returns:

  • (Object)


119
120
121
# File 'lib/cosmo/job.rb', line 119

def logger
  Logger.instance
end

#performObject

Parameters:

  • (Object)

Returns:

  • (Object)

Raises:



115
116
117
# File 'lib/cosmo/job.rb', line 115

def perform(...)
  raise NotImplementedError, "#{self.class}#perform must be implemented"
end