Преглед на файлове

fix: don't run rtc task in publishing

Also forgot to commit better binding name for #11731
Gabriel Horner преди 8 месеца
родител
ревизия
5c8b23febd
променени са 2 файла, в които са добавени 11 реда и са изтрити 10 реда
  1. 4 4
      src/main/frontend/components/views.cljs
  2. 7 6
      src/main/frontend/handler/db_based/rtc.cljs

+ 4 - 4
src/main/frontend/components/views.cljs

@@ -1530,10 +1530,10 @@
          (if group-by-property
            (let [readable-property-value #(if (de/entity? %) (db-property/property-value-content %) (str %))
                  ;; similar to readable-property but return entity if :db/ident to allow for icons
-                 groupable-readable-property-value #(if (de/entity? %)
-                                                      (if (:db/ident %) % (db-property/property-value-content %))
-                                                      (str %))
-                 groups (->> (group-by #(-> (:db/ident group-by-property) % groupable-readable-property-value)
+                 readable-property-value-or-ent #(if (de/entity? %)
+                                                   (if (:db/ident %) % (db-property/property-value-content %))
+                                                   (str %))
+                 groups (->> (group-by #(-> (:db/ident group-by-property) % readable-property-value-or-ent)
                                        (:rows table))
                              (sort-by #(db-property/property-value-content (first %))))]
              [:div.flex.flex-col.gap-4.border-t.py-4

+ 7 - 6
src/main/frontend/handler/db_based/rtc.cljs

@@ -198,11 +198,12 @@
           (prn :trying-to-restart-rtc graph-uuid (t/now))
           (c.m/<? (<rtc-start! (state/get-current-repo) :stop-before-start? false)))))))
 
-  (c.m/run-background-task
-   ::notify-client-need-upgrade-when-larger-remote-schema-version-exists
-   (m/reduce
-    (constantly nil)
-    (m/ap
+  (when-not config/publishing?
+   (c.m/run-background-task
+    ::notify-client-need-upgrade-when-larger-remote-schema-version-exists
+    (m/reduce
+     (constantly nil)
+     (m/ap
       (let [{:keys [repo graph-uuid remote-schema-version sub-type]}
             (m/?>
              (m/eduction
@@ -214,4 +215,4 @@
           ;; else
           (notification/show!
            "The server has a graph with a higher schema version, the client may need to upgrade."
-           :warning)))))))
+           :warning))))))))