You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code raises an exception, but the exception handling code itself is buggy and fails.
Possible Solution
The problem is that the 'job' variable is lexically restricted to the block and not available to the exception handler. A simple but kludgey fix would be to have a variable initially defined outside the block and assigned the value of job inside which would then be visible to the handlers. One could probably also move the begin block and handlers inside the block, although then if you want it to bail out on the first failure it'd take a little work to replicate that behavior.
Steps to Reproduce (for bugs)
I'm not sure why our code is getting into this in the first place, so I don't know, but if you hit this rescue clause you'll get the error.
Your Environment
ASpace 3.2.0, though the bug is still in the 3.3.0 code.
The text was updated successfully, but these errors were encountered:
Expected Behavior
We have a background job or somesuch which is attempting to run and hitting the exception handling in the get_next_job method in https://github.com/archivesspace/archivesspace/blob/v3.2.0/backend/app/lib/background_job_queue.rb, specifically the Sequel::NoExistingObject Branch
Current Behavior
The code raises an exception, but the exception handling code itself is buggy and fails.
Possible Solution
The problem is that the 'job' variable is lexically restricted to the block and not available to the exception handler. A simple but kludgey fix would be to have a variable initially defined outside the block and assigned the value of job inside which would then be visible to the handlers. One could probably also move the begin block and handlers inside the block, although then if you want it to bail out on the first failure it'd take a little work to replicate that behavior.
Steps to Reproduce (for bugs)
I'm not sure why our code is getting into this in the first place, so I don't know, but if you hit this rescue clause you'll get the error.
Your Environment
ASpace 3.2.0, though the bug is still in the 3.3.0 code.
The text was updated successfully, but these errors were encountered: