mandarons / icloud-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
1.19k stars 49 forks source link

[BUG] Docker container does not stop in oneshot mode #265

Open tymmej opened 1 month ago

tymmej commented 1 month ago

Describe the bug I have configured drive and photos sync to one shot by setting -1 to interval. After running docker image I expect that it will finish after syncing once.

To confirm I added && echo "end" to init.sh:

2024-10-10 06:26:45,572 :: INFO :: root :: sync.py :: 75 :: Syncing drive...
2024-10-10 06:26:45,572 :: INFO :: root :: sync.py :: 77 :: Drive synced
2024-10-10 06:26:45,572 :: INFO :: root :: config_parser.py :: 83 :: Syncing drive every -1 seconds.
2024-10-10 06:26:45,572 :: INFO :: root :: sync.py :: 80 :: Syncing photos...
2024-10-10 06:26:45,572 :: INFO :: root :: sync.py :: 82 :: Photos synced
2024-10-10 06:26:45,572 :: INFO :: root :: config_parser.py :: 98 :: Syncing photos every -1 seconds.
2024-10-10 06:26:45,573 :: INFO :: root :: sync.py :: 131 :: Resyncing at Thu Oct 10 06:26:45 2024 ...
2024-10-10 06:26:45,573 :: INFO :: root :: config_parser.py :: 83 :: Syncing drive every -1 seconds.
2024-10-10 06:26:45,573 :: INFO :: root :: config_parser.py :: 83 :: Syncing drive every -1 seconds.
end
[image still runing]
^C^\%

To Reproduce Steps to reproduce the behavior:

  1. Set both sync_intervals to -1
  2. Wait for sync
  3. See that docker container is still running

Expected behavior Docker container is stopped after syncing