                     conv (if votes
                            (conv-update conv-man conv votes error-handler)
                            conv)]
+                (log/info "Completed computing conversation zid:" zid)
+                (write-conv-updates! conv-man conv)
+                ;; Run reports corr matrix stuff (etc)
                 (doseq [report-task generate_report_data]
                   (generate-report-data! conv-man conv report-task))
-                (log/info "Completed computing conversation zid:" zid)
                 (swap! conversations assoc-in [zid :conv] conv)
-                (doseq [[k f] @listeners] (try (f conv) (catch Exception e (log/error "Listener error") (.printStackTrace e))))
+                (async/thread
+                  (doseq [[k f] @listeners] (try (f conv) (catch Exception e (log/error "Listener error") (.printStackTrace e)))))
                 (recur conv)))))))))
 
 

          (log/error "Validation error: Conversation value does not match schema for conv zid:" zid)
          (throw (Exception. (str "Validation error: Conversation Value does not match schema: "
                                  validation-errors))))
        ; Format and upload main results
        (doseq [[prep-fn uploader] [[prep-main db/upload-math-main] ; main math results, for client
                                    [prep-bidToPid db/upload-math-bidtopid] ; bidtopid mapping, for server
                                    [prep-ptpt-stats db/upload-math-ptptstats]]]
          (->> updated-conv
               prep-fn
               (uploader pg zid)))
        (log/info "Finished uploading math results for zid:" zid)
        ; Return the updated conv
        updated-conv)
      ; In case anything happens, run the error-callback handler. Agent error handlers do not work here, since

  (let [rid (:rid report-data)
        tids (map :tid (postgres/query (:postgres conv-man) (postgres/report-tids rid)))
        corr-mat (corr/compute-corr conv tids)]
    (async/thread
      (postgres/insert-correlationmatrix! postgres rid corr-mat)
      ;; TODO update to submit usng task type and task bucket
      (postgres/mark-task-complete! postgres (-> report-data :task-record :rid)))))


;; Need to think about what to do if failed conversations lead to messages piling up in the message queue XXX
