     (if join-current-transaction?
         (.add queue-obj ds/*current-transaction* opts)
         (.add queue-obj opts))))
+
+
+(defn purge! [& {:keys [queue]}]
+  (let [queue-obj (get-task-queue :queue queue)]
+    (.purge queue-obj)))
+
+
+;; TODO: Support deleting multiple tasks at once.
+(defn delete! [task & {:keys [queue]}]
+  (let [queue-obj (get-task-queue :queue queue)]
+    (.deleteTask queue-obj task)))

    ;; headers
    (doseq [[header-name header-value] headers]
      (.header opts header-name header-value))
    ;; params
    (doseq [[param-name param-value] params]
      (.param opts

             queue)))))


;; TODO: Support adding multiple tasks at once.
(defn add! [& {:keys [queue url task-name
                      join-current-transaction? params headers payload method
                      countdown-ms eta-ms eta]
               :or {join-current-transaction? false
                    params {}
