 
   (write-batch
     [_ event]
-    (write-batch event replica peer-replica-view state id messenger job-id egress-tasks))
+    (write-batch event replica peer-replica-view state messenger egress-tasks))
 
   (seal-resource [_ _]
     nil))

               (let [link (operation/peer-link replica-val state event target)]
                 (onyx.extensions/send-messages messenger event link segs)))))))))

  ([{:keys [onyx.core/id onyx.core/results
            onyx.core/messenger onyx.core/job-id
            onyx.core/state onyx.core/replica
            onyx.core/peer-replica-view onyx.core/serialized-task] :as event}]
   (write-batch event replica peer-replica-view state id messenger job-id (:egress-ids serialized-task))))

(defrecord Function [replica peer-replica-view state id messenger job-id egress-tasks]
  p-ext/Pipeline
  (read-batch
    [_ event]

(defn function [{:keys [onyx.core/replica
                        onyx.core/peer-replica-view
                        onyx.core/state
                        onyx.core/messenger
                        onyx.core/serialized-task] :as pipeline-data}]
  (->Function replica
              peer-replica-view
              state
              messenger
              (:egress-ids serialized-task)))
