logging readmes and comments

This commit is contained in:
vmorganp
2021-10-18 01:30:07 -07:00
parent 1954550f3e
commit 12842595e4
3 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
# Lazytainer
# Lazytainer - Lazy Load Containers
Putting your containers to sleep
*I don't really wanna do the work today*
@@ -27,7 +27,7 @@ $ docker-compose up
- LABEL=lazytainer # value of lazytainer.marker for other containers that lazytainer checks
# - TIMEOUT=30 # OPTIONAL number of seconds to let container idle
# - MINPACKETTHRESH=10 # OPTIONAL number of packets that must be recieved to keepalive/start container
# - POLLRATE=1 # OPTIONAL number of packets that must be recieved to keepalive/start container
# - POLLRATE=1 # OPTIONAL number of seconds to sleep between polls
# - VERBOSE=true # probably set this to false unless you're debugging or doing the initial demo
ports:
- 81:81

View File

@@ -8,7 +8,7 @@ services:
- LABEL=lazytainer # value of lazytainer.marker for other containers that lazytainer checks
- TIMEOUT=30 # OPTIONAL number of seconds to let container idle
- MINPACKETTHRESH=10 # OPTIONAL number of packets that must be recieved to keepalive/start container
- POLLRATE=1 # OPTIONAL number of packets that must be recieved to keepalive/start container
- POLLRATE=1 # OPTIONAL number of seconds to sleep between polls
- VERBOSE=true # probably set this to false unless you're debugging or doing the initial demo
ports:
- 81:81

View File

@@ -36,7 +36,7 @@ func main() {
if getActiveClients() == 0 && rxHistory[0]+minPacketThreshold > rxHistory[len(rxHistory)-1] {
// count up if we have no active clients
inactiveSeconds = inactiveSeconds + pollRate
fmt.Println(inactiveSeconds, "/", inactiveTimeout, "seconds without an active client")
fmt.Println(inactiveSeconds, "/", inactiveTimeout, "seconds without an active client or sufficient traffic on running container")
if inactiveSeconds >= inactiveTimeout {
stopContainers()
}