When popping a job off of the Redis Queue, the worker should be able to rollback its mutations to the queue's state if an error is encountered amidst these steps.
Solution (Changes Made)
Add a RedisRollbackBuilder and RedisRollbackExecutor to collect and run rollback steps.
Build up rollbacks and execute on failure inside RedisGradingJobRetriever.
Post-rollback, raise RedisJobRetrievalError to be bubbled up to __main__.py.
Feature/Problem Description
When popping a job off of the Redis Queue, the worker should be able to rollback its mutations to the queue's state if an error is encountered amidst these steps.
Solution (Changes Made)
RedisRollbackBuilder
andRedisRollbackExecutor
to collect and run rollback steps.RedisGradingJobRetriever
.RedisJobRetrievalError
to be bubbled up to__main__.py
.