Preston-Landers / concurrent-log-handler

fork of ConcurrentLogHandler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to play nicely with synced folders? (Google Drive for example)

Indiana3714 opened this issue · comments

I have Google Drive (on mirror mode) syncing the log files for my project, however it gets stuck on trying to sync the .__XXX.lock file forever, which balloons the CPU and RAM usage to close to 100% forever on my Windows 10 PC. Is there anything I can do to prevent this?

This package uses Win32API file locking to ensure safe concurrent access to write the log file. Maybe Google Drive doesn't like locked files very much. Which process is ballooning - the Python one or a Google Drive one? You should be able to see in Task Manager's details pane.

As a workaround, is it possible to set Drive to ignore *.lock files? You shouldn't need to sync or back those up really.

Currently there is no way to control where the lock file is placed - it's always in the same dir as the actual log file. However it might help to add an option to place the locks somewhere else, outside of the synced folder.