 
 (defn- get-job [jtype id params]
   "Returns a Job specification for the given parameters"
-  (j/build
-      (j/of-type jtype)
-      (j/using-job-data (conj params {"reportId" id} ))
-      (j/with-identity (j/key id))))
+  (jobs/build
+    (jobs/of-type jtype)
+    (jobs/using-job-data (conj params {"reportId" id} ))
+    (jobs/with-identity (jobs/key id))))
 
 (defn- get-trigger [id]
   "Returns a Trigger to be executed now"
-  (t/build
-    (t/with-identity (t/key id))
-    (t/start-now)))
+  (triggers/build
+    (triggers/with-identity (triggers/key id))
+    (triggers/start-now)))
 
 (defn- schedule-job [params]
   "Schedule a report for generation. For concurrent requests only schedules the report

  (let [id (report-id params)
        job (get-job ExportJob id params)
        trigger (get-trigger id)]
    (qs/maybe-schedule job trigger)
    {"status" "OK"
     "message" "PROCESSING"}))


  (let [baseURL (params "baseURL")]
    (doseq [sid (params "surveyIds")]
      (dosync
        (doseq [key (keys @cache) :when (and (= (:baseURL key) baseURL) (= (str sid) (:surveyId key)))]
        (alter cache dissoc key))))
    "OK"))
