             (log/warn "Stopping job" jname)
             (ignore-errors
              (.killJob job)
-             (while (not (.isComplete job))
+             (while (not (job-complete? job))
                (Thread/sleep 100))))
           (when (job-ran? job)
             (doseq [[fs path] fs-paths]

      (try
        (log/info "Launching job" jname)
        (.submit job)
        (while (not (.isComplete job))
          (Thread/sleep interval))
        (doto-let [result (.isSuccessful job)]
          (if result
            (log/info "Job" jname "succeeded")
            (do

            [parkour.util.shutdown :as shutdown]
            [parkour.util :refer
             [ignore-errors returning doto-let prev-reset!]])
  (:import [java.io IOException]
           [java.util.concurrent ExecutionException]
           [clojure.lang Var]
           [org.apache.hadoop.io NullWritable]
           [org.apache.hadoop.mapreduce Job]
