Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tymmej opened this issue Oct 10, 2024 · 6 comments
Open

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

tymmej opened this issue Oct 10, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@tymmej
Copy link
Contributor

tymmej commented Oct 10, 2024

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

@tymmej tymmej added the bug Something isn't working label Oct 10, 2024
@robdejonge
Copy link

This also happens to me.

2024-11-30 15:56:43,719 :: INFO :: root :: sync.py :: 77 :: Drive synced
2024-11-30 15:56:43,719 :: INFO :: root :: config_parser.py :: 83 :: Syncing drive every -1 seconds.
2024-11-30 15:56:43,720 :: INFO :: root :: sync.py :: 129 :: Resyncing at Sat Nov 30 15:56:42 2024 ...
2024-11-30 15:56:43,720 :: INFO :: root :: config_parser.py :: 83 :: Syncing drive every -1 seconds.

@nicx
Copy link

nicx commented Nov 30, 2024

same behaviour here. would be great if the container stops.

@nicx
Copy link

nicx commented Feb 12, 2025

@mandarons a short addition: same problem when using "retry_login_interval: -1". My expectation would be the docker container stops after the first login failed. but it just does not. is it the same problem? or should I open another bug?

@mandarons
Copy link
Owner

me problem when using "retry_login_interval: -1". My expectation would be the docker container stops after the first login failed. but it just does not. is it the same problem?

When retry_login_interval is set to -1, it indicates try login only once. This affects only the login flow retries and not whole application. Hence, it correctly won't cause whole application to exit.

Setting sync_interval to -1 should cause application exit (which appears to be not happening, hence this bug).

@nicx
Copy link

nicx commented Feb 19, 2025

@mandarons is it possible to exit the container too when the login fails? otherwise I would not recognize in any way that the sync process is no more working.

@mandarons
Copy link
Owner

Yeah, that's possible. I typically get notifications if logins are failing. But there is no point in keeping the container running if login is failing and retry_login_interval is set to -1.

Let me see if I can handle this case as well once I figure out solution to this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants