-
Notifications
You must be signed in to change notification settings - Fork 593
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
Google Cloud Storage importer #1098
Conversation
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, just a couple small things, and as discussed, maybe we can add some more error checking and retries in a separate PR later.
contrib/gcs_importer.py
Outdated
def callback(message): | ||
"""Google PubSub callback. | ||
|
||
This function is called on all incoming messages on the configures topic. |
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.
Tiny nit: s/configures/configured/
contrib/gcs_importer.py
Outdated
db_session.add(searchindex) | ||
db_session.commit() | ||
|
||
if sketch.has_permission(user, 'write'): |
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.
Maybe instead of not creating a timeline here when we don't have access we could create it and not associate it with the sketch?
@aarontp PTAL |
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. Just one tiny nit in a comment.
contrib/gcs_importer.py
Outdated
name=searchindex.name, description=searchindex.description, | ||
sketch=sketch, user=user, searchindex=searchindex) | ||
|
||
# If the user don't have write access to the sketch then create the |
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.
Tiny nit: s/don't/doesn't/
This is the first PR for this feature. Adds the ability to listen to changes on a Turbinia output to GCS and import automatically.