exiting in true seconds
tmcw opened this issue · 3 comments
Bug Report
Please give us details about your installation to assist you. Run dat -v
to see the version of Dat you are using.
- Operating system: Raspbian
- Node Version: 10.16.0
- Dat Version: v13.13.1
Expected behavior
When dat is going to exit, it tells you how many seconds until them.
Actual behavior
Dat is exiting in true seconds
@joehand I wouldn't mind having a crack at fixing this!
I can see the problem (opts.exit
is almost always just a boolean, except sometimes it's changed to be a Number instead that was introduced in #1098), but I'm not sure what the preferred fix would be... rename the whole --exit
parameter to dat pull
to something like --exitDelay
, or add opts.exitDelay
as a not-externally-visible parameter to use with --exit
if it's specified, or possibly something else?
It's not quite clear what is happening in the screenshot (obviously it is not synced if its only 35% and still downloading...). But... only showing the "exiting in X seconds" when --exit
is a number, rather than a boolean, seems like a good first fix.
I have similar issue with my dat archive, it gets stuck at 96.03% (always), it says also "dat synced, exiting in true seconds." and stays in this condition forever
I think this bug is a bit more broad than just X seconds, there is also some problem in calculating this percentage
P.S. dat v13.13.1