Skip to content
Browse files

mark failed files as analyzed so not retried over and over

  • Loading branch information...
1 parent f04bedc commit e1acc6023eba7867b555f74001e79c5c7bb68e09 @richhickey richhickey committed Oct 8, 2012
Showing with 14 additions and 13 deletions.
  1. +14 −13 src/datomic/codeq/core.clj
View
27 src/datomic/codeq/core.clj
@@ -509,19 +509,20 @@
(doseq [f (sort (clojure.set/difference cfiles afiles))]
;;analyze them
(println "analyzing file:" f " - sha: " (:git/sha (d/entity db f)))
- (try
- (let [db (d/db conn)
- src (with-open [s (exec-stream (str "git cat-file -p " (:git/sha (d/entity db f))))]
- (slurp s))
- adata (az/analyze a db f src)]
- (d/transact conn
- (conj adata {:db/id (d/tempid :db.part/tx)
- :codeq/op :analyze
- :codeq/file f
- :codeq/analyzer aname
- :codeq/analyzerRev arev})))
- (catch Exception ex
- (println (.getMessage ex))))))))
+ (let [db (d/db conn)
+ src (with-open [s (exec-stream (str "git cat-file -p " (:git/sha (d/entity db f))))]
+ (slurp s))
+ adata (try
+ (az/analyze a db f src)
+ (catch Exception ex
+ (println (.getMessage ex))
+ []))]
+ (d/transact conn
+ (conj adata {:db/id (d/tempid :db.part/tx)
+ :codeq/op :analyze
+ :codeq/file f
+ :codeq/analyzer aname
+ :codeq/analyzerRev arev})))))))
(println "Analysis complete!"))
(defn main [& [db-uri commit]]

0 comments on commit e1acc60

Please sign in to comment.
Something went wrong with that request. Please try again.