Closed jedie closed 3 weeks ago
In the upcoming 1.1.0 version (see development-branch) the configuration
module is no longer present. But it could still be that the ~.autocron/
directory may not get created. Will go into this.
Think it's better to store the file as default into ~/.cache/
Maybe similar to https://github.com/requests-cache/requests-cache e.g.:
session = CachedSession(
'demo_cache',
use_cache_dir=True, # Save files in the default user cache dir
)
This will result in the file: ~/.cache/demo_cache.sqlite
Technically ~/.cache/
would just be another path-name, but autocron stores not cached data but callables, payloads, results and also the configuration. On deleting a cache one would assume to lose some performance, but not real data. So from my point of view ~/.autocron/
is the proper location.
Maybe also a good option is to use https://pypi.org/project/platformdirs/ and use user_data_dir
?
Nice project - even know one maintainer. But beside that it is aimed for desktop applications it would end in using one opinionated location in favor for another opinionated location for the price of an additional dependency.
I get on startup just:
Seems to me, that
autocron.configuration.Configuration._get_autocron_directory()
will be never called! So the used parent directory~.autocron/
will be not created.