You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when using the SDK to process schemas with various services and events I kept getting inconsistent failures, usually around being unable to modify a file that didnt exist.
Upon inspecting the code for the commands I see the usage of async code for removing and updating the files
// Add service to the list
domain.services.push(service);
await rmDomainById(directory)(id, version);
await writeDomain(directory)(domain);
I am not entirely sure how node handles async await behind the scenes as far as threads go, but I was able to get the code to work by making the file read/write sync.
I think it makes sense to make Sync versions of these commands to allow the end user to pick wich one they want to use and add consistency on the behavior.
I am willing to add a PR with the new commands, either on the same package or a separate sync-sdk pacakge.
The text was updated successfully, but these errors were encountered:
I noticed that when using the SDK to process schemas with various services and events I kept getting inconsistent failures, usually around being unable to modify a file that didnt exist.
Upon inspecting the code for the commands I see the usage of async code for removing and updating the files
I am not entirely sure how node handles async await behind the scenes as far as threads go, but I was able to get the code to work by making the file read/write sync.
I think it makes sense to make Sync versions of these commands to allow the end user to pick wich one they want to use and add consistency on the behavior.
I am willing to add a PR with the new commands, either on the same package or a separate sync-sdk pacakge.
The text was updated successfully, but these errors were encountered: