Method: Funktor::WorkQueueHandler#update_job_category

Defined in:
lib/funktor/work_queue_handler.rb

#update_job_category(job, category) ⇒ Object



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/funktor/work_queue_handler.rb', line 84

def update_job_category(job, category)
  puts "starting update_job_category #{category}"
  dynamodb_client.update_item({
    key: {
      "jobShard" => job.shard,
      "jobId" => job.job_id
    },
    table_name: delayed_job_table,
    update_expression: "SET category = :category, queueable = :queueable",
    expression_attribute_values: {
      ":queueable" => "false",
      ":category" => category
    },
    return_values: "ALL_OLD"
  })
  puts "ending update_job_category #{category}"
end