-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new files to firestore folder #36
Added new files to firestore folder #36
Conversation
scripts/firestore_delete/main.py
Outdated
@@ -0,0 +1,35 @@ | |||
#The given script creates a CLoud Function to that is triggered when an image file is deleted from the street2sat-uploaded bucket | |||
#and then proceeds to delete the corresponding record from the Firestore DB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Inline comments should start with space: https://peps.python.org/pep-0008/#inline-comments
scripts/firestore_delete/main.py
Outdated
doc.delete() | ||
logger.info("Document has been deleted.") | ||
else: | ||
logger.info('No such record associated with the image file exists in the Firestore DB!') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the logs end with punctuation and some don't, best to be consistent
@@ -0,0 +1,3 @@ | |||
# Function dependencies, for example: | |||
# package>=version | |||
google-cloud-firestore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the package not available by default in the Cloud Functions environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it is needed to be mentioned in the requirements.txt file, else we get an error
Code looks good! |
I have made the necessary changes as requested. Please check and let me know in case any additional changes are needed. |
Added deploy command for the street2sat delete function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! There are still some comments without a space after #
but everything else is good. You can go ahead and merge.
Developed a Cloud Function that is triggered when an image file is deleted from the street2sat-uploaded bucket and then proceeds to delete the corresponding record from the Firestore DB.