This issue only exists in
test environment. Everything runs fine in
I am facing a strange issue after recently upgrading to Rails 188.8.131.52 from Rails 184.108.40.206. Everything was working fine before this upgrade.
In one of my models, I use ActiveJob to perform a task.
remember_webhook # No DB changes
init_errors_context # No DB changes
flow_step_invocation.implementation = self
return unless calculate_expressions # No DB changes
calculated! # An AASM event, with no callbacks
WebhookRequestJob#perform, I retrieve the object using the ID supplied
invocation = WebhookInvocation.find_by(id: webhook_invocation_id)
The problem is that in the
#perform, it cannot find the record (
nil). I even tried putting
p WebhookInvocation.all as the first line, but all it prints is an empty collection. On the other hand, if I try
p WebhookInvocation.all in
#schedule_invocation method, it properly prints out all the objects of
There is no exception being raised, no lines of warnings either.
I even tried passing the object directly to
WebhookRequestJob.perform_later(self), but the received object at
I noticed that there are some messages like
Creating scope :fail. Overwriting existing method FlowStepInvocation.fail, caused by using AASM. I eliminated them by using
create_scopes: false. But that still didn't solve the problem.