                       (assoc global-config :domains domains-map))]
     (future
       (load-and-sync-status domains-info
+                            false
                             (fn [domain]
                               (open-domain
                                local-config

         (thrift/failed-status t))))))

(defn load-and-sync-status
  ([domains-info loader-fn]
     (load-and-sync-status (keys domains-info) domains-info loader-fn))
  ([domains domains-info loader-fn]
     (let [loaders (dofor [domain domains]
                          (load-and-sync-status-of-domain domain domains-info loader-fn))]
       (with-ret (future-values loaders)
         (log-message "Successfully loaded domains: " (str-utils/str-join ", " domains))))))


          [domain (domain/init-domain-info (domain-shards domain))]
          ))))

(defn load-and-sync-status-of-domain [domain domains-info update? loader-fn]
  (future
    (try
      (domain/set-domain-status! (domains-info domain)
                                 (if update?
                                   (thrift/ready-status true)
                                   (thrift/loading-status)))
      (let [domain-data (loader-fn domain)]
        (if domain-data
          (domain/set-domain-data! (domains-info domain)
