When an exception is raised in a routine, fail the job status and add an error to the job status for the exception, then allow the exception to bubble out.
Fixed an issue where different calls making BackgroundJob status objects were using strings vs symbols (now that I think about it this may only have been an issue locally because dev uses the MemoryStore, whereas other envs use a RedisStore which requires keys to be strings). In any account, I forced all keys to be strings.
Fixed an issue where BackgroundJob.all was returning duplicate BackgroundJob objects.
Unrelated change to set progress to 1.0 when a job is completed. (no more 0% and "completed" jobs!)
Done. @Dantemss and @joemsak please review.
BackgroundJob.all
was returning duplicateBackgroundJob
objects.