jaros1 / Money-Network

Demo with complementary and alternative money. Implemented in ZeroNet and AngularJS. Focus on privacy, encryption, max data in client and min data on ZeroNet. Work in progress.
GNU General Public License v2.0
4 stars 4 forks source link

Write sync error #249

Closed jaros1 closed 7 years ago

jaros1 commented 7 years ago

jro test on old laptop (vpn=sweden). last online timestamp is not being updated in jro on new laptop (vpn=torando)

screenshot from 2017-10-27 12-39-39

w2-127.0.0.1-1509100803770.log mn-127.0.0.1-1509100789889.log

jaros1 commented 7 years ago

Maybe an issue with two fileWrite operations at the same time (data.json and status.json).

12:36:03.855 MoneyNetworkAPI.js:209 MoneyNetworkHubService.write_data_json:
merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/data.json fileWrite started (23). 4 pending ZeroNet API operations (19,21,22,23)

data.json fileWrite request 23 is running. starting status.json fileWrite request 30: still running 12:39:34.555

12:37:16.004 MoneyNetworkAPI.js:209 MoneyNetworkHubService.write_status_json get_my_user_hub callback 1:
merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/status.json fileWrite started (30). 4 pending ZeroNet API operations (23,28,29,30)

12:38:31.058 MoneyNetworkAPI.js:223 MoneyNetworkHubService.write_data_json:
merged-MoneyNetwork/1PgyTnnACGd1XRdpfiDihgKwYRRnzgz2zh/data/users/18DbeZgtVCcLghmtzvg4Uv8uRQAwR8wnDQ/data.json fileWrite finished. res = "OK". elapsed time 147203 ms (23). 1 pending ZeroNet API operation (30)

12:39:34.555 MoneyNetworkAPI.js:223 MoneyNetworkService.check_public_reactions: query 12 dbQuery finished. res = "OK". elapsed time 137 ms (44). 2 pending ZeroNet API operations (30,31)
jaros1 commented 7 years ago

Added a z_file_write wrapper to MoneyNetworkAPILib. Now ensuring only one running fileWrite process + other validations (merger site path, correct auth_address / user directory)