Add daemon csv export to Makefile
parent
fba373f835
commit
3b77099bec
|
@ -1,3 +1,5 @@
|
|||
go.work*
|
||||
.env
|
||||
*.csv
|
||||
*.csv
|
||||
*.out
|
||||
csv_export.gz
|
27
Makefile
27
Makefile
|
@ -1,5 +1,7 @@
|
|||
.PHONY: all build up update down start-db status logs psql init-db
|
||||
|
||||
# ---------------------------- Docker ----------------------------
|
||||
|
||||
all:
|
||||
go test -v ./...
|
||||
|
||||
|
@ -28,6 +30,12 @@ status:
|
|||
logs:
|
||||
@docker compose logs -f -n 50 lister consumer record-indexer
|
||||
|
||||
# ---------------------------- Docker ----------------------------
|
||||
|
||||
|
||||
|
||||
# ---------------------------- Database ----------------------------
|
||||
|
||||
psql:
|
||||
@docker compose exec -it postgres psql -U postgres -d bluesky
|
||||
|
||||
|
@ -36,3 +44,22 @@ init-db: init.sql
|
|||
@sleep 10
|
||||
@docker compose stop lister
|
||||
@cat db-migration/init.sql | docker exec -i "$$(docker compose ps --format '{{.Names}}' postgres)" psql -U postgres -d bluesky
|
||||
|
||||
# ---------------------------- Database ----------------------------
|
||||
|
||||
|
||||
|
||||
# ---------------------------- CSV Export ----------------------------
|
||||
|
||||
csv-export:
|
||||
|
||||
@nohup ./csv_export.sh > csv_export.out &
|
||||
@tail -f csv_export.out
|
||||
|
||||
kill-csv-export:
|
||||
@kill -9 `pgrep csv_export.sh`
|
||||
|
||||
csv-compress:
|
||||
@tar -cvzf csv_export.gz handles.csv post_counts.csv follows.csv like_counts.csv
|
||||
|
||||
# ---------------------------- CSV Export ----------------------------
|
Loading…
Reference in New Issue