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

  "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))))))


                                                  service
                                                  request-shutdown)
                           job-pool))
            (mapv (fn [cfg db]
                    (let [interval (to-millis (:gc-interval cfg))]
                      (when (pos? interval)
                        (let [request (db-config->clean-request cfg)]
                          (interspaced interval
                                       #(coordinate-gc-with-shutdown db clean-lock
                                                                     cfg request
                                                                     (:stop-status context))
                                       job-pool)))))
                  write-cfgs
                  write-dbs)
            (-> context
                (assoc :job-pool job-pool
                       :command-loader command-loader)
