-
Notifications
You must be signed in to change notification settings - Fork 58
Description
While running "preview:generate-all", the app crashes without an error.
I usually read the output of "-vv" and check manually if the last file processed is working or not.
If the file is corrupted, I delete it through the browser (update database), and run the command again, only to crash on a different file
I tried to run the command using --workers=100, but eventually they all crash, quite on the same time
Perhaps they all try to process the same file?
(EDIT: Running 25 tasks, output log shows each worker died on a different file)
My suggestion is to change the forking mechanism to a "per media file" worker
- The main worker lists all media files;
- Main thread creates a child process;
- Handle the media file to child (path argument);
- Child generate preview;
- Child die;
- Return to 2 until list is empty;
--workers defaults to 1; user can input a greater value.
This logic will allow to process all files, without crashing the full queue and needing restart the process.