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

Syncing empty fields may cause human and system sync confusion #1

Open
dynamicdan opened this issue Mar 17, 2015 · 3 comments
Open

Comments

@dynamicdan
Copy link
Owner

If a ui action has no content in the script field then the download will be "" or 0 bytes. The system will think it hasn't been downloaded and try and request each time you start the tool.

There is no known work around other than being a smarter user... Why are they downloaded scripts of 0 bytes?... add something once downloaded and the problem is gone!

SOLUTION 1:

Potentially we can resolve this issue by saving "sync data" that the last downloaded remote version was 0 bytes and therefore ignore the file during startup. We would need to reset the sync data for this file if the record changed on the server to have content. We would then always check for special sync data before trying to download a record for the first time.

SOLUTION 2:

Check the timestamp when the 0 bytes file was created. If the time is more than 5 seconds in the past then assume that it has already been processed and the record should stay as 0 bytes. Potentially delete the local 0 bytes file to save on processing checks OR simply rename to signify that it has been skipped: "MyEmptyScript.js" => "__MyEmptyScript.js" and then ignore files starting with "__".

@dynamicdan
Copy link
Owner Author

Current progress is that files are no longer checked on startup and 0 byte files are ignored in sync once downloaded. A message explains the steps to take (restart cmd line tool, add content to file, done).

The current error handling system could be adjusted to adopt solution 2 (see above).

@dynamicdan dynamicdan self-assigned this May 11, 2015
@dynamicdan dynamicdan changed the title Records may contain no data causing a request each time Instance records may contain no data causing human and system sync confusion May 11, 2015
@dynamicdan dynamicdan changed the title Instance records may contain no data causing human and system sync confusion Syncing empty fields may cause human and system sync confusion Jun 26, 2016
@jacebenson
Copy link

@dynamicdan so whats the ask here. Find the code that downloads the file, if the file size is 0 bytes give it a name of __name.ext?

@dynamicdan
Copy link
Owner Author

It's been a while since I thought about this. Perhaps it's now possible to identify this scenario and handle it. We could save info in the meta file that a record was downloaded as 0 bytes. Then update the various functions. Could avoid messing with file names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants