Skip to content
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

Add pre/post-process hooks for evidence #43

Merged
merged 2 commits into from
Jun 22, 2017
Merged

Add pre/post-process hooks for evidence #43

merged 2 commits into from
Jun 22, 2017

Conversation

aarontp
Copy link
Member

@aarontp aarontp commented Jun 17, 2017

What do you think about this as a base implementation for {pre,post}-processing could work? I realized that almost all of the cases for preprocessing are related to specific evidence types, and we can use the normal inheritance mechanisms here to make things work. For example, the GoogleCloudDisk.preprocess() can do the attaching, and then it can call its parent's (RawDisk's) preprocess() to do the actual local mounting of the disk (if we wanted to actually mount it) too.

If we have a non-evidence specific type of pre/post processing that we want to do, I think we can implement that as decorators for the TurbiniaTask.run() methods, but I wasn't sure if we had a good use-case for that, so I didn't want to add it until we needed it.

@aarontp aarontp requested a review from berggren June 17, 2017 18:01
@aarontp aarontp added this to the Alpha milestone Jun 17, 2017
@aarontp
Copy link
Member Author

aarontp commented Jun 17, 2017

This PR is part of a fix for #42. Is there any specific syntax I need to use to reference that issue with this PR, but not actually close it? Or does the above work as intended? /me tests.

Copy link
Collaborator

@berggren berggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a small nit.

"""Postprocess this evidence after the task runs.

This gets run in the context of the local task execution on the worker
nodes after the task itself runs. This can be used to clean-up after the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/runs/has finished ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member Author

@aarontp aarontp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@aarontp aarontp merged commit 87b6d79 into master Jun 22, 2017
@aarontp aarontp deleted the preprocessor branch August 28, 2017 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants