Skip to content

Conversation

@thwkai
Copy link

@thwkai thwkai commented May 30, 2025

I took the liberty to make a small update to the README and added a "new feature" that introduces a configurable wait period (sleep) before the container exits.

Details:

  • README.md – Added a hint on how to determine the ID of an Organisationseinheit.
  • README.md – Fixed a minor typo.
  • config.json.sample – Added a sleep variable (default: 0).
  • divera.py – Added a conditional block at the end of the script. If the 'sleep' config value is set and greater than 0, the script will pause for the specified number of minutes before exiting. Also added the required import time.

Rationale for the sleep feature:
In my setup, I manage Docker containers fully automatically (including automated GHCR builds) using Portainer stacks. In the current release version, this leads to an undesired loop: the container is restarted immediately after finishing. To prevent this, I introduced a configurable sleep timer at the end of the script. This ensures the container remains running for a defined period before exiting (and being automatically restarted). In my case, I chose a 15-minute delay, effectively throttling the re-run interval of the status sync.

thwkai added 3 commits May 30, 2025 10:23
- added a hint, how to find out ID of Organisationeinheit
- fixed typo
Add sleep sample parameter
@thwkai thwkai changed the title Update README.md Sleep wait enhancement May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant