 
 (defn get-algorithm
   "Returns an algorithm if defined in the system."
-  [^String algorithm-name]
-  (log/debugf "get-algorithm: %s..." algorithm-name)
-  (let [result (get-conf algorithm-name)]
+  [algorithm]
+  (log/debugf "get-algorithm: %s..." algorithm)
+  (let [result (get-conf algorithm)]
     (if result
       {:status 200 :body result}
-      {:status 404 :body (str algorithm-name " not found.")})))
+      {:status 404 :body (str algorithm " not found.")})))
 
 (defn put-algorithm
   "Updates or creates an algorithm definition"

  "Enables an algorithm in the system."
  ;;; TODO - Autodeploy mesos dockerimage, make sure dockerimage exists
  ;;; server queue & exchange are created when the listener starts in server.clj
  [^String algorithm]
  (let [[queue exchange] ((juxt event/create-queue
                                event/create-exchange) algorithm)
        server-exchange (get-in config [:server :exchange])


(defn get-conf
  "Retrieve algorithm configuration or nil"
  [algorithm]
  (->> (hayt/where [[= :algorithm algorithm]])
       (hayt/select :algorithms)
       (db/execute)
       (first)))
