               :answer/author user-eid
               :answer/text (:answer answer)
               :answer/ts (:ts answer)
-              :_question/answers (:question answer)})]
+              :question/_answers (:question-id answer)})]
+    (prn tx)
     @(d/transact db-conn tx)))
 
-(defjob QuestionnaireJob [{:keys [domain db-conn]}]
-  (let [db (d/db db-conn)
+(defjob QuestionnaireJob [job-data]
+  (let [{:strs [domain db-conn]} (conversion/from-job-data job-data)
+        db (d/db db-conn)
         token (:team/token (d/entity db [:team/domain domain]))
         users (d/q '[:find [?name ...]
                      :in $ ?domain

            [clojurewerkz.quartzite.jobs :as jobs :refer (defjob)]
            [clojurewerkz.quartzite.triggers :as triggers]
            [clojurewerkz.quartzite.schedule.cron :as cron]
            [byte-streams])
  (:gen-class))


        dm-sub (async/sub dm-pub username answer-chan)
        qas (reduce
             (fn [question-answers question]
               (send-to-user! conn username (:question/text question))
               (conj question-answers
                     {:ts (java.util.Date.)
                      :team (:name (:team conn))
                      :domain (:domain (:team conn))
                      :user username
                      :question-id (:db/id question)
                      :answer (:text (async/<!! answer-chan))}))
             []
             questions)]
