                                 :instance-id->tracked-failed-instance instance-id->tracked-failed-instance'
                                 :instance-id->failed-health-check-count instance-id->failed-health-check-count'}})
                      scheduler-messages' remaining))
-            (do (log/info (timing-message-fn) "for" (count service->service-instances) "services.")
-                {:service-id->health-check-context service-id->health-check-context'
-                 :scheduler-messages scheduler-messages}))))
-      (do (log/info (timing-message-fn))
-          {:service-id->health-check-context service-id->health-check-context}))))
+            (do
+              (log/info (timing-message-fn) "for" (count service->service-instances) "services.")
+              {:service-id->health-check-context service-id->health-check-context'
+               :scheduler-messages scheduler-messages}))))
+      (do
+        (log/info (timing-message-fn) "and found no active services")
+        {:service-id->health-check-context service-id->health-check-context}))))
 
 (defn start-scheduler-syncer
   "Starts loop to query marathon for the app and instance statuses,

                       :priority true)]
            (recur next-state)))
        (catch Exception e
          (log/error e "Fatal error in service-chan-maintainer")
          (System/exit 1))))
    {:exit-chan exit-chan
     :query-chan state-query-chan}))

(ns waiter.scheduler
  (:require [clj-time.core :as t]
            [clojure.core.async :as async]
            [clojure.string :as str]
            [clojure.tools.logging :as log]
            [metrics.timers :as timers]
