global registry of duct
"prefixes" and a collection of con-duct
suite commands to work with it
#186
Labels
duct
"prefixes" and a collection of con-duct
suite commands to work with it
#186
somewhere under
~/.cache
directory (check how platformdirs takes that cache location but we should avoid adding dependency) store a collection of prefixes with abs paths, so if I runduct
somewhere with someDUCT_OUTPUT_PREFIX
we would know that and addcon-duct locations
and-a|--all-locations
tocon-duct ls
(#185) .Also
con-duct locations check [--prune]
command would then check if locations still exist (may be folder was removed etc) and optionally pruneThis would also enable to develop some simple
con-duct search
to find where/when a particular command was ran (and how long it took etc).This way poor @yarikoptic would be able to find his prior analyses etc.
Implementation vise -- to avoid need for locking / avoid race conditions, idea could be simply to write simple text files named based on hash value (e.g. md5sum) of the simple json stored within such as
{"cwd": cwd, "output_prefix": DUCT_OUTPUT_PREFIX}
. So if file exists already -- location is known and nothing to do . If does not exist - quickly create and ignore error while conflicting -- two processes would try to create identical files.then command would just go and load all those files.
--prune
would remove some which no longer found etc.The text was updated successfully, but these errors were encountered: