fractaledmind / acidic_job

Elegant, resilient, durable workflows for Rails apps
https://fractaledmind.github.io/acidic_job/
MIT License
492 stars 10 forks source link

Handle case when error occurs trying to write an attr_accessor value #82

Open fractaledmind opened 1 year ago

fractaledmind commented 1 year ago

Imagine a workflow step method that makes an API call to create a record in an external system:

def create_external_record
  self.external_record = ExternalClient.create(...)
end

Now, imagine that we get a timeout error when AcidicJob is trying to write the value to the Run#attr_accessors field.

In this case, the record is created in the external system, but we don't have a persisted copy of that record on our end.