-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Following changes intend to tackle performance problems in the backend. Main idea is avoid passing JSON attributes all around whenever uploading LabRecordImports or ElectronicPharmacyStockRecords. Instead of doing that, JSON parameters are now received as files and loaded by the workers only when it's required. These files are related with the model instances through `has_one_attached` macro. This commit introduces breaking changes regarding client server interaction, and every Collector using this version should point to a server that includes these changes.
- Loading branch information
1 parent
edb9c64
commit ca986d7
Showing
3 changed files
with
44 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const createJSONFile = (content, filename) => { | ||
const blob = new Blob([JSON.stringify(content)], { | ||
type: 'application/json' | ||
}); | ||
return new File([blob], filename); | ||
}; | ||
|
||
export default createJSONFile; |