   "Given a map-reduce job, tells Mongo to perform the job.
    Returns true on success, false on failure."
   [worker job]
-  (add-to-cache (:cache worker) (:aggmap job)))
+  (add-to-cache (:cache worker) (edn/read-string (:aggmap job))))
 
 (defn- update-cache
   "Update the query cache to reflect that the map-reduce job is

      (coll/insert-and-return *work-collection* {:_id (:to aggmap)
                                                 :status "unprocessed"
                                                 :created (now)
                                                 :aggmap aggmap})
      (catch MongoException$DuplicateKey e
        (coll/find-map-by-id *work-collection* (:to aggmap))))))



  Returns updated record."
  [worker job]
  (let [cache (:cache worker)
        aggmap (edn/read-string (:aggmap job))]
    (coll/update *work-collection*
                 {:_id (:_id job)}
                 {"$set" {:status "processed"
                          :finished (now)}})
    (touch-cache cache (:query aggmap))))

(defn- process-next-job
  [worker]
