Skip to content
Permalink
db14496781
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
56 lines (55 sloc) 2.32 KB
(ns overseer.component.endpoints-session-superuser
(:require [clojure.tools.logging :refer [info error]]
[clojure.core.async :as async]
[com.stuartsierra.component :as component]
[datascript.core :as d]
[de.mpg.shh.util-message-server.helpers :as message-helpers]
[de.mpg.shh.util-overseer.server :as overseer-server]
[overseer.utils :as utils]))
(defrecord EndpointsSessionSuperUser [request-channel overseer-conn hostname rx-config-list tx-config-list]
component/Lifecycle
(start [this]
(let [receive (fn [destination data]
(try
(overseer-server/receive overseer-conn (assoc data :destination destination))
(catch Throwable t
(error "failed to receive '" (pr-str destination) "' message " (pr-str data) " " (utils/stack-trace-to-string t)))))]
{
:error
(fn [request-channel message]
(error "error endpoint received: " message))
:workflow-create
(fn [request-channel {data :data :as message}]
(receive :workflow-create data))
:workflow-instance-create
(fn [request-channel {data :data :as message}]
(receive :workflow-instance-create data))
:workflow-play
(fn [request-channel {data :data :as message}]
(receive :workflow-play data))
:workflow-pause
(fn [request-channel {data :data :as message}]
(receive :workflow-pause data))
:workflow-clear-failed
(fn [request-channel {data :data :as message}]
(receive :workflow-clear-failed data))
:workflow-clear-all
(fn [request-channel {data :data :as message}]
(receive :workflow-clear-all data))
:workflow-restart-from-step
(fn [request-channel {data :data :as message}]
(receive :workflow-restart-from-step data))
:workflow-update-workflow-schedule-max
(fn [request-channel {data :data :as message}]
(receive :workflow-update-workflow-schedule-max data))
:resource-toggle-backup
(fn [request-channel {data :data :as message}]
(receive :resource-toggle-backup data))
:overseer-synch
(fn [request-channel {data :data :as message}]
(info "got overseer-synch")
(receive :overseer-synch data))
:overseer-synch-transaction
(fn [request-channel {data :data :as message}]
(receive :overseer-synch-transaction data))
})))