 
 (defn purge-nodes!
   "Delete nodes which have been *deactivated* longer than `node-purge-ttl`."
-  [db node-purge-ttl]
+  [node-purge-ttl db]
   {:pre [(map? db)
          (period? node-purge-ttl)]}
   (try

        (scf-store/garbage-collect!)))
    (catch Exception e
      (log/error e "Error during garbage collection"))))

(defn check-for-updates
  "This will fetch the latest version number of PuppetDB and log if the system


(defn sweep-reports!
  "Delete reports which are older than than `report-ttl`."
  [report-ttl db]
  {:pre [(map? db)
         (period? report-ttl)]}
  (try
