capistrano経由でdb:migrateを実行してますが、
db:migrate実行時にエラーが発生したのにrescueで検知できませんでした。
こちらなぜrescueで検知できないかご教示いただけますでしょうか。
エラー内容は以下のとおりです。
ActiveRecord::StatementInvalid: Mysql2::Error: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable): CREATE TRIGGER insert_drama_episode_mark_histories AFTER INSERT ON drama_episode_marks FOR EACH ROW
begin rescueロジックは以下の通りです。
begin execute fetch(:get_unicorn_container) + " bash -lc 'sh /xx/db_migrate.sh'" rescue _send_message($!,"","#{$@}","bad","例外発生!!!") exit 1; end
※_send_messageでslack通知をしてます。
※/xx/db_migrate.shにrailsのdb:migrateを実行するロジックが書いてあります。
以上、よろしくお願いします
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。