计图commit补充commit_db_transaction
This commit is contained in:
parent
6608c799f0
commit
11d22d5d5a
|
@ -43,6 +43,7 @@ namespace :commit_log_to_db do
|
||||||
sql_connection.begin_db_transaction
|
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 = "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.execute(sql)
|
||||||
|
sql_connection.commit_db_transaction
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -81,6 +82,7 @@ namespace :commit_log_to_db do
|
||||||
sql_connection.begin_db_transaction
|
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 = "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.execute(sql)
|
||||||
|
sql_connection.commit_db_transaction
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue