Refactor code to resolve jobs in WAIT_ASYNC into JQManagedJob. Add tests...

....
oops copy pasta, fixed

On Oct 6, 2014, at 11:15 AM, Loren Norman <notifications@github.com> wrote:

> In src/JQJobs/JQManagedJob.php:
> 
> > +                }
> > +            }
> > +
> > +            // move job to disposition returned by resolveWaitAsyncJob
> > +            switch ($disposition) {
> > +                case self::STATUS_COMPLETED:
> > +                    $mJob->markJobComplete();
> > +                    break;
> > +                case self::STATUS_WAIT_ASYNC:
> > +                    $mJob->markJobWaitAsync();
> > +                    break;
> > +                case self::STATUS_FAILED:
> > +                    $mJob->markJobFailed($err);
> > +                    break;
> > +                default:
> > +                    throw new Exception("Invalid return value " . var_export($disposition, true) . " from job->run(). Return one of JQManagedJob::STATUS_COMPLETED, JQManagedJob::STATUS_WAIT_ASYNC, or JQManagedJob::STATUS_FAILED.");
> Bad error message, should be job->resolveWaitAsync(), not job->run().
> 
> —
> Reply to this email directly or view it on GitHub.
>