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

Azure Data Studio - Non Saved Files - Not Recording Time #266

Closed
leemcmullen opened this issue Mar 22, 2022 · 4 comments
Closed

Azure Data Studio - Non Saved Files - Not Recording Time #266

leemcmullen opened this issue Mar 22, 2022 · 4 comments

Comments

@leemcmullen
Copy link

leemcmullen commented Mar 22, 2022

Hey,

Just wanted to let you know about an issue with working in temporary files in Azure Data Studio.

While developing, I often spend time in Azure Data Studio (ADS) working in a new query window, however I often don't ever end up saving the contents of the query window when I'm finished, I just close and don't save when I'm done.

This doesn't end up getting tracked in Wakatime. Checking out the log from within ADS and I see lots of the following:

{"caller":"/Users/runner/work/wakatime-cli/wakatime-cli/pkg/filter/filter.go:35","func":"1","level":"error","message":"filter file: skipping because of non-existing file \"/SQLQuery_4\"","now":"2022-03-22T09:54:15Z","version":"v1.38.0"}

So I'm guessing maybe the cli doesn't track time for non existing files?

I wonder if it's possible to check for the existence of a file and if not, still track the time spent but just send the name it has access to (i.e. SQLQuery_4 in this case) rather than not tracking anything?

Thanks for this taking the time to build this excellent tool, it's really useful 🔥

EDIT
Just realised I'm in the vscode-wakatime repo, which I think is probably how the ADS integration works so I think I'm in the right place. Happy to move to another repo (CLI maybe?) if it makes more sense though.

@alanhamlett
Copy link
Member

alanhamlett commented Apr 4, 2022

We could this functionality. Do filenames for sql queries always follow the pattern SQLQuery_\d+? We should only force tracking for SQL Queries, and still skip tracking normal files that don't exist on disk.

@leemcmullen
Copy link
Author

@alanhamlett Yes that's correct, they're always titled SQLQuery_1, SQLQuery_2 and so on.

@alanhamlett
Copy link
Member

Added support for tracking ^SQLQuery_[\d]+$ files in release v18.1.0.

Once microsoft/azuredatastudio#18989 is merged you'll be able to upgrade the plugin.

@leemcmullen
Copy link
Author

Awesome, thanks Alan 🔥

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

No branches or pull requests

2 participants