Fork me on GitHub
#duct
<
2018-09-05
>
ijmo03:09:40

Is there a clean way to receive the jetty port from main arguments and merge it with duct.server.http/jetty in config?

dadair03:09:37

@ijmo is there a requirement to have it through command line args? Can you use an ENV var? If so, you can capture it in the duct config map via #duct/env ["<YOUR_ENV_VAR_NAME>" Str :or "<SOME_DEFAULT_VALUE>"]

ijmo04:09:50

@dadair Thanks for helping a noob. I think that will do it.

šŸ‘ 1
dadair04:09:50

Let me know if you run into any other issues šŸ™‚

dadair22:09:34

Iā€™m trying to implement programmatic migrations by reifying the ragtime migration protocol, as so:

(defn up! [db]
  ;; TODO
  nil)

(defn down! [db]
  ;; TODO
  nil)

(defmethod ig/init-key ::migration [k _]
  (reify p/Migration
    (id [_] k)
    (run-up! [_ db] (up! (:db-spec db)))
    (run-down! [_ db] (down! (:db-spec db)))))
and I am referencing the component under the :migrations key for the migrator. The migrator successfully runs the run-up!, but I get IllegalArgumentException No implementation of method: :run-down! of protocol: #'ragtime.protocols/Migration found for class: nil clojure.core/-cache-protocol-fn (core_deftype.clj:583) on the run-down!. Can anyone see why that would be the case?