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

feat: Node File System Persister #61

Merged
merged 11 commits into from
Jul 11, 2018
Merged

feat: Node File System Persister #61

merged 11 commits into from
Jul 11, 2018

Conversation

offirgolan
Copy link
Collaborator

@offirgolan offirgolan commented Jul 11, 2018

  • File System Persister
  • Node tests

screen shot 2018-07-10 at 6 38 56 pm

@offirgolan offirgolan requested a review from jasonmit July 11, 2018 06:10
_Type_: `String`
_Default_: `'recordings'`

The root directory to store all recordings.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are absolute paths supported as well? Might want to mention

constructor(recordingsDir) {
this.recordingsDir = recordingsDir;
constructor(options = {}) {
this.recordingsDir = options.recordingsDir;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we throw if no recordingDir?

Pass the data through the base persister's stringify method so
the output will be consistent with the rest of the persisters.
*/
this.api.saveRecording(recordingId, parse(this.stringify(data)));
Copy link
Contributor

@jasonmit jasonmit Jul 11, 2018

Choose a reason for hiding this comment

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

Any reason for no return since saveRecording does have a return value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The other persisters don't return anything from saveRecording.

}

deleteRecording(recordingId) {
this.api.deleteRecording(recordingId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The other persisters don't return anything from deleteRecording .

@offirgolan offirgolan merged commit 0a0eeca into master Jul 11, 2018
@offirgolan offirgolan deleted the fs-persister branch July 11, 2018 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants