Skip to content

Commit

Permalink
Merge pull request #19 from clingen-data-model/somatic-topic-seed
Browse files Browse the repository at this point in the history
Update misc for seeding watcher topic
  • Loading branch information
toneillbroad authored Jul 23, 2024
2 parents 63f8592 + f1f7c2d commit 379d263
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/watcher/ftpparse.clj
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,5 @@
(->> weekly-ftp-url fetch-ftp parse-ftp rest (filter (every-pred since? filename?)) vec)))

(comment
(ftp-since #inst "2024-06-01"))
(ftp-since #inst "2024-07-01"))

3 changes: 2 additions & 1 deletion src/watcher/stream.clj
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@

(comment
(get-last-processed)
(save-to-topic (str (java.util.Date.)) (json/write-str [{"Name" "ClinVarRCVRelease_2024-0610.xml.gz", "Size" 4342574098, "Released" "2024-06-12 08:12:12", "Last Modified" "2024-06-12 08:12:12", "Directory" "/pub/clinvar/xml/RCV_release/weekly_release", "Host" "https://ftp.ncbi.nlm.nih.gov", "Release Date" "2024-06-12"}])))
(save-to-topic (str (java.util.Date.)) (json/write-str [{"Name" "ClinVarVCVRelease_2024-0716.xml.gz", "Size" 3964266964, "Released" "2024-07-17 02:57:18", "Last Modified" "2024-07-17 02:57:18", "Directory" "/pub/clinvar/xml/weekly_release", "Host" "https://ftp.ncbi.nlm.nih.gov", "Release Date" "2024-07-16"}])))


10 changes: 8 additions & 2 deletions src/watcher/watcher.clj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
[& args]
(let [write-to-kafka (= -1 (if (some? args) (.indexOf args "--kafka") -1))
initiate-job (= -1 (if (some? args) (.indexOf args "--job") -1))
files (-> (stream/get-last-processed)
files (-> (stream/get-last-processed)
get-last-processed-date
get-latest-files-since)
file-details (process-file-details files)
Expand Down Expand Up @@ -107,4 +107,10 @@


(comment
(-> (ftpparse/ftp-since #inst "2024-06-01")))
(-> (ftpparse/ftp-since #inst "2024-07-01")))

(comment
(-> (stream/get-last-processed)
get-last-processed-date
get-latest-files-since
))

0 comments on commit 379d263

Please sign in to comment.