delayed_job
delayed_job copied to clipboard
Change hook names to be more delayed-job specific
This aims to change the delayed job hooks to have more specific names to avoid collisions. Because of performable_method
, many objects can be turned into delayed job payload objects. If those objects happen to define methods with names like "before", "after", "error", or "success", those methods will be called by the job runner. This can cause surprising bugs and behaviors. (A similar problem is mentioned in this pr https://github.com/collectiveidea/delayed_job/pull/943)
This aims to change the names of those methods to be more specific to running delayed jobs to make them harder to collide with accidentally.
This is a breaking change, so we could also do work to phase this change in more slowly if it's desirable (deprecate hooks with the old names, run new or old hook name -- whichever is present -- and then remove the old hook names in a following version)