Closed CaseOf closed 11 months ago
The change https://github.com/Martchus/syncthingtray/commit/89caa7610287860c2661b0c663ef7d57dbe83f6d that I have committed on master should do the trick. It is a failry simple change so I assume it works. However, I haven't tested it yet. You might want to test it yourself by building from the master branch.
I did try from master, it is still ending the wait instantly on a disconnected device.
I did build this way: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="../bin" -DNO_MODEL=ON -DNO_FILE_ITEM_ACTION_PLUGIN=ON ..
A stupid question, but have you actually used the newly introduced option --require-devs-connected
? I did not change the default behavior because that would probably be an incompatible change.
I guess I'll be able to test this myself tomorrow.
The build command looks fine by the way (although I've never dared to specify a relative install prefix).
A stupid question, but have you actually used the newly introduced option
--require-devs-connected
? I did not change the default behavior because that would probably be an incompatible change.
Not that stupid, I did not try it before you mentioned it even if I did see it in your code ¯_(ツ)_/¯ Now that I’m using it on master, it is waiting while the device is disconnected but still waits once device connects, sync, and then idle. Is there something missing?
Maybe a trigger once device comes back online?
Now that I’m using it on master, it is waiting while the device is disconnected but still waits once device connects, sync, and then idle.
You mean the CLI never stops waiting even if the device is connected and idling at some point? Not sure why it would get stuck this way. I suppose I need to debug this myself then.
Now that I’m using it on master, it is waiting while the device is disconnected but still waits once device connects, sync, and then idle.
You mean the CLI never stops waiting even if the device is connected and idling at some point? Not sure why it would get stuck this way. I suppose I need to debug this myself then.
that's what I meant
I tested it myself and could reproduce the issue. There was nothing wrong with my change but there was something more fundamentally broken in the way device events are processed in the underlying library. It should be fixed on master so you might want to test it again yourself.
It seems to work as expected now. Thanks !
Relevant components
syncthingctl
)libsyncthing
)Is your feature request specific to a certain platform/environment? Please specify. No
Is your feature request related to a problem? Please describe. When running
syncthingctl -w --dev [device-id-here]
it does not consider to still wait for device to be online.Describe the solution you'd like I would like
wait-for-idle
feature insyncthingctl
to wait for a given device via--dev
to be online and synced to trigger it being idle.Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context When device is offline, I cannot guarantee sync is up to date on both devices. On my context, it is to wait all data to be synced to start a backup via borg on a script.