Harden stuck Whisper recovery and record transcription duration.
Fail jobs on timeout, treat stale reserved queue rows as orphans, skip migrate/seed on queue/reverb boot, and store how long each successful run took.
This commit is contained in:
+17
-2
@@ -36,7 +36,22 @@ if [ ! -f vendor/autoload.php ]; then
|
||||
composer install --prefer-dist --no-interaction
|
||||
fi
|
||||
|
||||
php artisan migrate --force --no-interaction
|
||||
php artisan db:seed --force --no-interaction
|
||||
# Only the web app should migrate/seed. Queue and Reverb share the DB and must
|
||||
# not race on sqlite (locks) or re-seed on every restart/deploy.
|
||||
should_bootstrap_db() {
|
||||
case " $* " in
|
||||
*" queue:work "*|*" queue:listen "*|*" reverb:start "*)
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if should_bootstrap_db "$@"; then
|
||||
php artisan migrate --force --no-interaction
|
||||
php artisan db:seed --force --no-interaction
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user