Browse Source

chore: remove unused require

rcmerci 1 week ago
parent
commit
2b707dced1
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/main/frontend/worker/db_worker.cljs

+ 7 - 6
src/main/frontend/worker/db_worker.cljs

@@ -30,7 +30,6 @@
             [frontend.worker.rtc.client-op :as client-op]
             [frontend.worker.rtc.core :as rtc.core]
             [frontend.worker.rtc.db-listener]
-            [frontend.worker.rtc.encrypt :as rtc-encrypt]
             [frontend.worker.rtc.migrate :as rtc-migrate]
             [frontend.worker.search :as search]
             [frontend.worker.shared-service :as shared-service]
@@ -302,13 +301,15 @@
                 initial-data (sqlite-create-graph/build-db-initial-data
                               config (select-keys opts [:import-type :graph-git-sha]))]
             (ldb/transact! conn initial-data {:initial-db? true})))
-          (let [migration-result (db-migrate/migrate conn)]
-            (when (client-op/rtc-db-graph? repo)
-              (let [client-ops (rtc-migrate/migration-results=>client-ops migration-result)]
-                (client-op/add-ops! repo client-ops))))
 
-          (db-listener/listen-db-changes! repo (get @*datascript-conns repo)))))))
+        (gc-sqlite-dbs! db client-ops-db conn {})
 
+        (let [migration-result (db-migrate/migrate conn)]
+          (when (client-op/rtc-db-graph? repo)
+            (let [client-ops (rtc-migrate/migration-results=>client-ops migration-result)]
+              (client-op/add-ops! repo client-ops))))
+
+        (db-listener/listen-db-changes! repo (get @*datascript-conns repo))))))
 
 (defn- iter->vec [iter']
   (when iter'