 
 (def n-messages 15000)
 
-(def batch-size 1320)
+(def batch-size 20)
 
 (def env-config (assoc (:env-config config) :onyx/id id))
 

  (def out-2-calls
    {:lifecycle/before-task :onyx.peer.killed-job-test/inject-out-2-ch})

  (def lifecycles
    [{:lifecycle/task :in-1
      :lifecycle/calls :onyx.peer.killed-job-test/in-1-calls}
     {:lifecycle/task :in-1
      :lifecycle/calls :onyx.plugin.core-async/reader-calls}
     {:lifecycle/task :in-2
      :lifecycle/calls :onyx.peer.killed-job-test/in-2-calls}
     {:lifecycle/task :in-2
      :lifecycle/calls :onyx.plugin.core-async/reader-calls}
     {:lifecycle/task :out-1
      :lifecycle/calls :onyx.peer.killed-job-test/out-1-calls}
     {:lifecycle/task :out-1
      :lifecycle/calls :onyx.plugin.core-async/writer-calls}
     {:lifecycle/task :out-2
      :lifecycle/calls :onyx.peer.killed-job-test/out-2-calls}
     {:lifecycle/task :out-2
      :lifecycle/calls :onyx.plugin.core-async/writer-calls}])

  (def v-peers (onyx.api/start-peers 3 peer-group))

  (def j1 (:job-id (onyx.api/submit-job
                    peer-config
                    {:catalog catalog-1 :workflow workflow-1
                     :lifecycles lifecycles
                     :task-scheduler :onyx.task-scheduler/balanced})))

  (def j2 (:job-id (onyx.api/submit-job
                    peer-config
                    {:catalog catalog-2 :workflow workflow-2
                     :lifecycles lifecycles
                     :task-scheduler :onyx.task-scheduler/balanced})))

  (onyx.api/kill-job peer-config j1)

     (onyx.api/shutdown-peer v-peer))

   (onyx.api/shutdown-peer-group peer-group)

   (onyx.api/shutdown-env env)))
