Class: Asynq::Client::Candidate
- Inherits:
-
Struct
- Object
- Struct
- Asynq::Client::Candidate
- Defined in:
- lib/asynq.rb
Instance Attribute Summary collapse
-
#asynq ⇒ Object
Returns the value of attribute asynq.
-
#payload ⇒ Object
Returns the value of attribute payload.
Instance Method Summary collapse
- #in(sec) ⇒ Object
- #jid ⇒ Object
- #now ⇒ Object
- #with_args(*args, **kwargs) ⇒ Object
- #with_options(**kw) ⇒ Object
Instance Attribute Details
#asynq ⇒ Object
Returns the value of attribute asynq
50 51 52 |
# File 'lib/asynq.rb', line 50 def asynq @asynq end |
#payload ⇒ Object
Returns the value of attribute payload
50 51 52 |
# File 'lib/asynq.rb', line 50 def payload @payload end |
Instance Method Details
#in(sec) ⇒ Object
51 52 53 |
# File 'lib/asynq.rb', line 51 def in(sec) asynq.in(sec, payload) end |
#jid ⇒ Object
70 |
# File 'lib/asynq.rb', line 70 def jid = payload["jid"] |
#now ⇒ Object
55 56 57 |
# File 'lib/asynq.rb', line 55 def now asynq.now(payload) end |
#with_args(*args, **kwargs) ⇒ Object
64 65 66 67 68 |
# File 'lib/asynq.rb', line 64 def with_args(*args, **kwargs) args.append(kwargs.transform_keys(&:to_s)) unless kwargs.empty? payload["args"] = args self end |
#with_options(**kw) ⇒ Object
59 60 61 62 |
# File 'lib/asynq.rb', line 59 def (**kw) payload.merge!(kw.transform_keys(&:to_s)) self end |