Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron stuck on corrupted file #7

Open
sndr570 opened this issue Oct 4, 2024 · 0 comments
Open

Cron stuck on corrupted file #7

sndr570 opened this issue Oct 4, 2024 · 0 comments

Comments

@sndr570
Copy link

sndr570 commented Oct 4, 2024

When a corrupt file is added to the queue, the cron will try to convert it, instead of skipping it and adding a FAILED state, it will throw an exception and end the script, so the next time the cron is run, it will try to convert the same file again and is basically caught in a loop.

Suggestion: Instead fo throwing an exception, set the status to "conversion::STATUS_FAILED" so the file is not attempted again, and return it so the queue will continue with the next file.

        if (!isset($json['result']['pdf']) || is_null($json)) {
            // throw new coding_exception('Response was: '.$response);
            $conversion->set('status', conversion::STATUS_FAILED);
            $conversion->update();
            mtrace($response);
            return $this;
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant