Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Commit fe5ea7d

Browse files
committed
Remove DB transaction since it does more harm than good
1 parent 743ba31 commit fe5ea7d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject googlesheets-sql-sync "0.4.6"
1+
(defproject googlesheets-sql-sync "0.4.7"
22
:description "Keep your SQL database in sync with Google Sheets"
33
:url "https://github.com/jorinvo/googlesheets-sql-sync"
44
:license {:name "MIT"

src/googlesheets_sql_sync/db.clj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,11 @@
100100
(map #(ensure-size header-count %)))]
101101
(try
102102
(log/info "Updating table" table)
103-
(jdbc/with-db-transaction [conn db]
104-
(if-let [old-headers (get-headers-or-drop conn table)]
105-
(do
106-
(check-header-conflicts headers old-headers)
107-
(clear-table conn table))
108-
(create-table conn escaped-headers table))
109-
(write-rows conn table escaped-headers data))
103+
(if-let [old-headers (get-headers-or-drop db table)]
104+
(do
105+
(check-header-conflicts headers old-headers)
106+
(clear-table db table))
107+
(create-table db escaped-headers table))
108+
(write-rows db table escaped-headers data)
110109
(catch Exception e (throw-db-err target table e))))
111110
sheet)

0 commit comments

Comments
 (0)