mirror of
https://github.com/vmorganp/Lazytainer.git
synced 2025-12-21 13:23:02 +01:00
logging readmes and comments
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user