Created
February 4, 2019 21:07
-
-
Save eraserhd/f4f8f52fb43a2e4a5b6fc740a1101c02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns twou.centralpark.data.loader) | |
(defn ns-task-data [symbol] | |
(let [subtasks (->> (ns-publics symbol) | |
vals | |
(filter (comp :taskdef? meta))) | |
ns-meta (meta (:ns (meta (first subtasks)))) | |
task-name (name (:taskdef/code-keyword ns-meta)) | |
_ (prn :name task-name) | |
_ (prn :type (class task-name) (type task-name)) | |
task-symbol (symbol task-name) | |
_ (prn :task task-name task-symbol)] | |
(concat | |
(list 'task task-symbol (str (:taskdef/uuid ns-meta)) | |
(:taskdef/name ns-meta)) | |
subtasks))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dev=> (twou.centralpark.data.loader/ns-task-data 'twou.centralpark.proc.new-marketing-strategy) | |
:name "new-marketing-strategy" | |
:type java.lang.String java.lang.String | |
:task "new-marketing-strategy" nil | |
(task nil "5b197af0-a62e-48c5-b51b-445d522c1d11" "Stand up marketing strategy - {{:taskexec/marketing-strategy :marketing-strategy/shortname}}" #'twou.centralpark.proc.new-marketing-strategy/marketing-site-specified #'twou.centralpark.proc.new-marketing-strategy/marketing-strategy-details #'twou.centralpark.proc.new-marketing-strategy/live-in-landing-page-specified #'twou.centralpark.proc.new-marketing-strategy/branding-exists #'twou.centralpark.proc.new-marketing-strategy/prospect-form-grouping-in-cms #'twou.centralpark.proc.new-marketing-strategy/landing-page-specified #'twou.centralpark.proc.new-marketing-strategy/live-in-marketing-site-specified #'twou.centralpark.proc.new-marketing-strategy/landing-page-exists #'twou.centralpark.proc.new-marketing-strategy/prospect-form-grouping-specified) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment