Closed jpzfm closed 7 years ago
Please elaborate on “disconnects”.
Are you prompted to allow access for Alfred Google Drive?
Does Alfred show any items from your Google Drive after having seen “Successfully connected to Google Drive” in your browser?
Are you using version 2.0?
Furthermore, please delete ~/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow\ Data/com.drive.azai91/google-drive.log
then do a login/fetch and paste the resulting log from doing that.
I'm using 2.0. I ran the Sign Out command and it disconnected from the account. After, it took a few times, I received the prompt to reconnect my gDrive account and got the “Successfully connected to Google Drive” prompt.
It seems to be taking a lot longer than v.1.x, but I'm assuming it may not be cached yet. I thought it wasn't working, it just seems to be taking a while. The log below says it takes a fraction of a second, but it takes about 10 seconds to appear in the Alfred menu.
[2017-08-29 09:20:03.851] [44039] [DEBUG] Latest online version is v2.0, we are running 2.0 [2017-08-29 09:20:03.857] [44039] [DEBUG] Loaded 615 items from cache (created 9 minutes ago) [2017-08-29 09:20:03.865] [44039] [DEBUG] Execution took 0.015 seconds [2017-08-29 09:20:09.022] [44044] [DEBUG] ./google-drive.rb ["--filter", "summed"] [2017-08-29 09:20:09.023] [44044] [DEBUG] Loaded 12 releases from cache (created 28 minutes ago)
The first time it may take 10 seconds (it takes ~1.5 seconds for me, but I only have 150 items).
This would also be the case after using “Sign out of Google Drive” (since this will delete the cache).
All subsequent invocations of d query
should be near instant.
Can you confirm that it was only the first time (or after sign out), that you had to wait ~10 seconds?
The log file should also make this clear.
Can I close this issue?
Yes. Works now, still a bit slower than v.1, but I'll give it some time.
Thanks!
still a bit slower than v.1
How much are we talking about? From the log above, it takes only 0.015 seconds to return items to Alfred, but Alfred does not call the script instantly after typing, I think it has a 0.5s delay, so from you type something, till you see the results, you’ll have to wait for half a second.
But this should also have been the case with 1.x of this workflow.
If you are seeing larger delays then you may have run into an edge case that I would like to investigate further.
You can btw test the workflow from a terminal, in Alfred use the “Open Terminal” context action and then run something like: time >/dev/null ./google-drive.rb --filter x
then you will get an exact measure of how long it takes the script to return results for a filter string of x
.
Disconnects after update in Alfred and I can't get it to reauthorize, even after I delete and reinstall.