From 11d22d5d5a0556b639fc22af0dd990491cc25c48 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 18 Apr 2023 21:41:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=9B=BEcommit=E8=A1=A5=E5=85=85commi?= =?UTF-8?q?t=5Fdb=5Ftransaction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/commit_log_to_db.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/commit_log_to_db.rake b/lib/tasks/commit_log_to_db.rake index 6365c485f..b5505beda 100644 --- a/lib/tasks/commit_log_to_db.rake +++ b/lib/tasks/commit_log_to_db.rake @@ -43,6 +43,7 @@ namespace :commit_log_to_db do sql_connection.begin_db_transaction sql = "INSERT INTO commit_logs (`user_id`, `project_id`, `repository_id`, `name`, `full_name`, `commit_id`, `ref`, `message`, `created_at`, `updated_at`) VALUES #{data}" sql_connection.execute(sql) + sql_connection.commit_db_transaction end end end @@ -81,6 +82,7 @@ namespace :commit_log_to_db do sql_connection.begin_db_transaction sql = "INSERT INTO commit_logs (`user_id`, `project_id`, `repository_id`, `name`, `full_name`, `commit_id`, `ref`, `message`, `created_at`, `updated_at`) VALUES #{data}" sql_connection.execute(sql) + sql_connection.commit_db_transaction end end