    (fn [task]
      (let [allocated (get-in replica [:allocations job task])
            n-allocated (if (seq allocated) (count allocated) 0)]
-       (< n-allocated (or (get-in replica [:task-saturation job task]) Double/POSITIVE_INFINITY))))
+       (< n-allocated (or (get-in replica [:task-saturation job task]) 
+                          Double/POSITIVE_INFINITY))))
    tasks))
 
 (defn jobs-with-available-tasks [replica jobs]


(defmethod reallocate-from-job? :onyx.job-scheduler/round-robin
  [scheduler old new state]
  (if-let [allocation (peer->allocated-job (:allocations new) (:id state))]
    (let [peer-counts (balance-jobs new)
          peers (get (job->peers new) (:job allocation))]
      (when (> (count peers) (get peer-counts (:job allocation)))
        (let [n (- (count peers) (get peer-counts (:job allocation)))
              peers-to-drop (drop-peers new (:job allocation) n)]
          (when (some #{(:id state)} (into #{} peers-to-drop))
            true))))
    true))

(defmethod reallocate-from-job? :onyx.job-scheduler/percentage
  [scheduler old new state]

      (when (> (count peers) peer-counts)
        (let [n (- (count peers) peer-counts)
              peers-to-drop (drop-peers new (:job allocation) n)]
          (when (some #{(:id state)} peers-to-drop)
            true))))
    true))

