Skip to content

Commit

Permalink
Add time limit to nightly scrape + year option
Browse files Browse the repository at this point in the history
  • Loading branch information
msj committed May 8, 2024
1 parent b0a04a3 commit 7cdcfcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
year=$(shell date +%Y)

.PHONY: all
all: upload

Expand Down Expand Up @@ -53,11 +55,11 @@ civil-%.jl: cases.db
START=$$(sqlite-utils query --csv --no-headers cases.db \
"$(CIVIL_SCRAPE_START_QUERY)" -p subdivision $*); \
echo $$START; \
scrapy crawl civil -a division=$* -a start=$$START -O $@;
scrapy crawl civil -s CLOSESPIDER_TIMEOUT=3600 -a year=$(year) -a division=$* -a start=$$START -O $@;

chancery.jl: cases.db
START=$$(sqlite3 cases.db < scripts/nightly_chancery_start.sql); \
scrapy crawl chancery -a start=$$START -O $@;
scrapy crawl chancery -a year=$(year) -a start=$$START -O $@;

cases.db :
sqlite3 $@ < scripts/initialize_db.sql
Expand Down

0 comments on commit 7cdcfcd

Please sign in to comment.