lib/cloudtasker/cloud_task.rb in cloudtasker-0.9.0 vs lib/cloudtasker/cloud_task.rb in cloudtasker-0.9.1

- old
+ new

@@ -46,9 +46,11 @@ # @param [Hash] payload Thee task payload # # @return [Cloudtasker::CloudTask] The created task. # def self.create(payload) + raise MaxTaskSizeExceededError if payload.to_json.bytesize > Config::MAX_TASK_SIZE + resp = backend.create(payload)&.to_h resp ? new(resp) : nil end #