I am currently trying @koudelka 's Honeydew library hooked to Ecto models to handle background job processing in a project. So far so good, but I am a bit puzzled on how to best set it up in a way that we run a background job on each record update, not just after a record has been created.
I have opened an issue on Honeydew Github because this is something we may want to document for others in docs: https://github.com/koudelka/honeydew/issues/81
but basically my thinking is if I need to run a job after record has been created, I need to insert new record that represents this update. So, let’s say I have a Photo record, and I want to run ClassifyPhoto job after user updated the Photo. The only good solution I can think of is to create PhotoUpdate record, that belongs_to Photo, and it triggers ClassifyPhoto job.
Is this the correct solution or I am missing something?