   [{:keys [args]} replica]
   (let [candidates (universally-executable-jobs replica)
         balanced (common/percentage-balanced-workload replica)
+        allocation (common/peer->allocated-job (:allocations replica) (:id args))
         job
         (reduce
          (fn [_ job]

         candidates)]
    (if job
      (if-let [task (select-task replica job (:id args))]
        (-> replica
            (common/remove-peers args)
            (update-in [:allocations job task] conj (:id args))
            (update-in [:allocations job task] vec)
            (assoc-in [:peer-state (:id args)] :warming-up)
            (offer-acker job task args))
        replica)
      replica)))



(defmethod select-job :onyx.job-scheduler/greedy
  [{:keys [args]} replica]
  (let [job (first (universally-executable-jobs replica))
        allocation (common/peer->allocated-job (:allocations replica) (:id args))]
    (if job
      (if-let [task (select-task replica job (:id args))]
        (if (or (not= task (:task allocation))
                (not= job (:job allocation)))
          (-> replica
              (common/remove-peers args)
              (update-in [:allocations job task] conj (:id args))
