 (defmethod mime-type-dispatch "application/pdf" [download]
   (h/counter "MIME types" "PDF")
   (debug "mime-type-dispatch got PDF from " (:request_uri download))
-  (handle-pdf download))
+  (pdf-docid-dispatch download))
 
 (defmethod mime-type-dispatch "text/html" [download]
   (h/counter "MIME types" "HTML")


;;; Step 3 (for PDFs): dispatch on presence of Docid

(defn handle-pdf [download]
  (if-let [docid (ids/get-docid "altcrawl" (:request_uri download))]
    (do (debug "handle-pdf got docid " docid " for " (:request_uri download))
        (h/counter "PDF files" "with docid")
        (convert-pdf docid download))
    (do (warn "handle-pdf found no docid for " (:request_uri download))
        (h/counter "PDF files" "no docid")
        nil)))


;; mime-type-dispatch----------------------
;;  |                   |                 |
;;  |                   |                 |
;; handle-html         pdf-docid-dispatch        warn
;;  |       |           |      |              
;;  |      warn         |     warn
;;  |                   |                     
