-
Notifications
You must be signed in to change notification settings - Fork 352
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
Conversation
offirgolan
commented
Jul 11, 2018
•
edited
Loading
edited
- File System Persister
- Node tests
docs/persisters/fs.md
Outdated
_Type_: `String` | ||
_Default_: `'recordings'` | ||
|
||
The root directory to store all recordings. |
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.
Are absolute paths supported as well? Might want to mention
constructor(recordingsDir) { | ||
this.recordingsDir = recordingsDir; | ||
constructor(options = {}) { | ||
this.recordingsDir = options.recordingsDir; |
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.
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))); |
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.
Any reason for no return
since saveRecording does have a return value?
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.
The other persisters don't return anything from saveRecording
.
} | ||
|
||
deleteRecording(recordingId) { | ||
this.api.deleteRecording(recordingId); |
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.
Same as above
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.
The other persisters don't return anything from deleteRecording
.