 (ns hivewing-core.worker
   (:require [hivewing-core.configuration :refer [sql-db]]
+            [hivewing-core.hive-image-notification :as hin]
             [hivewing-core.core :refer [ensure-uuid]]
             [hivewing-core.worker-events :refer :all]
             [hivewing-core.worker-config :refer :all]

  [worker-uuid]
  (worker-config-delete worker-uuid)
  (worker-events-send worker-uuid :.deleted-worker true)
  (jdbc/delete! sql-db :workers ["uuid = ?" (ensure-uuid worker-uuid)]))

(defn worker-access?
  "Worker given the token and uuid, can it access?"

  [worker-uuid hive-uuid]
  ; YOU MUST UPDATE THE HIVE And worker image
  ; YOU MUST inform the worker what hive it is in!
  (throw "ACK")
  (println "TODO"))

(defn worker-join-apiary
  "Adds the worker to an apiary, setting the hive_uuid to nil"
  [worker-uuid apiary-uuid]
  (throw "ACK")
  (println "TODO"))

(defn worker-delete
