|
|
@@ -110,21 +110,23 @@ |
|
|
|
:as payload}] |
|
|
|
(log/info "Make a correlation plot with %s" payload) |
|
|
|
(let [log-path (fs-lib/join-paths workdir "log") |
|
|
|
response {:data {:charts [(fs-lib/join-paths workdir "plotly.json")] |
|
|
|
:results []} |
|
|
|
:log log-path} |
|
|
|
task-id (create-task! {:id uuid |
|
|
|
:name name |
|
|
|
:description description |
|
|
|
:payload payload |
|
|
|
:owner owner |
|
|
|
:plugin-name (:plugin-name plugin-context) |
|
|
|
:plugin-type (:plugin-type plugin-context) |
|
|
|
:plugin-version (:plugin-version plugin-context) |
|
|
|
:response response})] |
|
|
|
response {:charts [(fs-lib/join-paths workdir "plotly.json")] |
|
|
|
:results [] |
|
|
|
:log log-path |
|
|
|
:response_type :data2charts |
|
|
|
:task_id uuid}] |
|
|
|
(create-task! {:id uuid |
|
|
|
:name name |
|
|
|
:description description |
|
|
|
:payload payload |
|
|
|
:owner owner |
|
|
|
:plugin-name (:plugin-name plugin-context) |
|
|
|
:plugin-type (:plugin-type plugin-context) |
|
|
|
:plugin-version (:plugin-version plugin-context) |
|
|
|
:response response}) |
|
|
|
(fs-lib/create-directories! workdir) |
|
|
|
(spit log-path (json/write-str {:status "Running" :msg ""})) |
|
|
|
(update-process! task-id 0) |
|
|
|
(update-process! uuid 0) |
|
|
|
(publish-event! "corrplot" |
|
|
|
{:context {:datafile datafile |
|
|
|
:corr_vars corr_vars |
|
|
@@ -137,8 +139,8 @@ |
|
|
|
:template-dir (fs-lib/join-paths (:config-dir plugin-context) "templates") |
|
|
|
:env-dir (:env-dir plugin-context) |
|
|
|
:dest-dir workdir |
|
|
|
:task-id task-id}) |
|
|
|
(merge response {:task-id task-id}))) |
|
|
|
:task-id uuid}) |
|
|
|
response)) |
|
|
|
|
|
|
|
(def metadata |
|
|
|
(make-routes "corrplot" :ChartPlugin |