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

lintalist, sync issue and cloud drive #151

Open
sine-w opened this issue Feb 5, 2020 · 6 comments
Open

lintalist, sync issue and cloud drive #151

sine-w opened this issue Feb 5, 2020 · 6 comments
Labels

Comments

@sine-w
Copy link

sine-w commented Feb 5, 2020

Hi again,
This time not related to nvda.
I put my lintalist inside the Google drive and sync across my to OS, i.e. OS 1 and OS2.
The two OS will not be online on the same time, so it comes the following problem.
On both OS I set it to run on startup

On OS1,
I added a new text into the default bundle
I edited the paste behavior
then I turn off OS1.

After some time, I return to OS 2,
the system startup and lintalist run immediately.
However, at the time when lintalist is run on startup, the files inside google drive have not been updated to match the latest changes made on OS1.
And if I forgot to reload the lintalist,if I switch off OS2, the files on the google drive may be updated with the changes made on OS2, but changes made on OS1 will be ignored.

I am not sure if I communicated this correctly.

My current fix for this, is

  1. disable the auto run on startup, so that whenever I start lintalist manually, the files in google drive should be updated.
  2. I could still retain the run on startup, but I have to press reload lintalist manually everytime when new OS is run. Probably after certain minutes after the system is loaded.

Currently I am sticking to method 1.

I am not sure if there could be a fix on the lintalist.

@lintalist
Copy link
Owner

I think I understand the problem.

When you close OS1, do you put it sleep or hibernate mode or actually turn it off completely?

That would be useful to know.

Background:

When lintalist closes it saves all settings and bundles, so when the system shutsdown (turned off) lintalist is no longer active and all changes are saved.

If you then start OS2 there shouldn't be a problem as it will load the recently saved settings and bundles.

If OS1 is put in sleep/hibernation mode lintalist is not closed as such and it may not save the bundles and settings. Also when OS1 wakes up it will simply continue to use the bundle and settings that Lintalist already has in memory on OS1 and it will conflict with changes you made in OS2 or vice versa as Lintalist holds the data in memory and doesn't read data continuously from the bundles. It would be slow and not useful.

So if OS1 and OS2 are actually turned off, there should be no problem.

If they sleep/hibernate there most likely will be.

Solution:

This would be experimental but I could try to add some code that would:

Detect when the OS is put into sleep or hibernate mode.

When it does, close Lintalist so it saves all bundles/settings as it normally would when you exit Lintalist or turn off the computer.

At the same time start a new separate script that will monitor when the OS is waking up again and the user logs in, when it does it should then start Lintalist again loading the most recent bundles and settings from the current OS or the other OS.

@sine-w
Copy link
Author

sine-w commented Feb 10, 2020

Hi,
Well, I actually turn off OS 1 and move onto OS2, i.e. "shut down"

@lintalist
Copy link
Owner

That is strange. As I said when Lintalist closes which it does when OS1 is shutdown it saves all settings and bundles by default.

Can you perhaps check the bundle txt file to see if Google Drive is actually synchronizing the bundle txt and settings.ini file(s) when you start OS2? So add a new snippet "testing 123" shut OS1 down, start OS2 and the bundles file should have "testing 123" in it when you open in your text editor.

If it doesn't Google Drive hasn't synchronized the file(s) yet.

If that is the case there needs to be a delay before Lintalist is started so it gives Google Drive the time to sync before Lintalist tries to read the bundles - which may take a bit of trial and error unless there is a way to detect when syncing is complete (I don't know if that is possible).

I assume you have a main autohotkey script you have always running, you could use that to launch Lintalist as well of course but only after say 30 seconds using a SetTimer for example.

Or if you want you can try the task scheduler to launch Lintalist and set a delay, here is a decent description of where to find it and set it up: https://www.maketecheasier.com/start-scheduled-tasks-with-delay-windows/

@sine-w
Copy link
Author

sine-w commented Feb 13, 2020

Yes, it seemed that things are not sync immediately.

  1. the edited bundle text file are not updated immediately after I turn on OS2

  2. setting file is not updated immediately.
    Google drive created something like Settings[Conflict 1].ini in the folder

@lintalist
Copy link
Owner

I'm not sure what to do about it, I see posts on Google Products website that others are complaining about slow syncing but no solution. I also don't see a way to check syncing is ready.

So starting it manually might be the best solution for now. Perhaps future updates of Google cloud will solve it.

@sine-w
Copy link
Author

sine-w commented Feb 15, 2020

Thanks.
Yes, I am currently using the manual method.
that is to start lintalist whenever after computer starts for some mins.

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

No branches or pull requests

2 participants