   (close-write-dbs (get-in context [:shared-globals :scf-write-dbs]))
   (when-let [ds (get-in context [:shared-globals :scf-read-db :datasource])]
     (.close ^Closeable ds))
+
   (when-let [command-loader (:command-loader context)]
     (future-cancel command-loader))
   context)

  "Implements the PuppetDBServer clean method, see the protocol for
  further information."
  [context config what]
  (let [lock (:clean-lock context)]
    (when (.tryLock lock)
      (try
        (clean-up (get-in context [:shared-globals :scf-write-db])
                  lock
                  (:database config)
                  what)
        true
        (finally
          (.unlock lock))))))



          ;; Pretty much this helper just knows our job-pool and gc-interval
          (let [job-pool (mk-pool)
                ;; FIXME: forbid subdb settings?
                schema-check-interval (:schema-check-interval database)
                write-cfgs (conf/reduce-section
                            (fn [result name settings] (conj result settings))
