Skip to content

Commit

Permalink
Add docs for firestore usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sabeechen committed Jan 14, 2024
1 parent d45543c commit 19fd8cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ junit/test-results.xml
coverage.xml
hassio-google-drive-backup/dev/data/data_cache.json
hassio-google-drive-backup/dev/data/*.backup
keyfile.json
8 changes: 7 additions & 1 deletion hassio-google-drive-backup/dev/error_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
DELETE_BATCH_SIZE = 200
STORE_NAME = "error_reports"

# Before running, set up firestore credentials with these commands:
# pip install --upgrade google-cloud-firestore
# gcloud auth login
# gcloud config set project hassio-drive-backup
# gcloud iam service-accounts keys create keyfile.json --iam-account [email protected]
# export GOOGLE_APPLICATION_CREDENTIALS=keyfile.json

def delete_old_data():
# Initialize Firestore
Expand Down Expand Up @@ -42,7 +48,7 @@ def main():

# Add any other argument you want in future. For example:
# parser.add_argument("--future_arg", help="Perform some future operation.")

args = parser.parse_args()

# Respond to arguments
Expand Down

0 comments on commit 19fd8cc

Please sign in to comment.