Merge branch 'development'

This commit is contained in:
Thomas Williams 2024-07-08 14:59:48 +01:00
commit a00a8f2f4d
3 changed files with 7 additions and 3 deletions

View file

@ -39,4 +39,4 @@ See the available configuration options, which should be specified in config.py.
- **hostMonitorEndTime** - the end time which the host monitor should shut down. This does not stop the script itself and this monitor will restart at the start time. - **hostMonitorEndTime** - the end time which the host monitor should shut down. This does not stop the script itself and this monitor will restart at the start time.
- **urlMonitorStartTime** - the start time which the url monitor should start at the earliest. - **urlMonitorStartTime** - the start time which the url monitor should start at the earliest.
- **urlMonitorEndTime** - the end time which the url monitor would shut down. This does not stop the script itself and this monitor will restart at the start time. - **urlMonitorEndTime** - the end time which the url monitor would shut down. This does not stop the script itself and this monitor will restart at the start time.
- **usePip** - whether or not to use pip to install dependencies. Set to false if your environment is externally managed

View file

@ -25,3 +25,4 @@ hostMonitorStartTime = "00:00:00"
hostMonitorEndTime = "23:59:59" hostMonitorEndTime = "23:59:59"
urlMonitorStartTime = "00:00:00" urlMonitorStartTime = "00:00:00"
urlMonitorEndTime = "23:59:59" urlMonitorEndTime = "23:59:59"
usePip = True

View file

@ -34,6 +34,9 @@ def get_pip_command():
def install_dependencies(): def install_dependencies():
if not config.usePip:
return
pip_command = get_pip_command() pip_command = get_pip_command()
with open('requirements.txt', 'r') as req_file: with open('requirements.txt', 'r') as req_file:
@ -250,12 +253,12 @@ if __name__ == "__main__":
import sys import sys
import subprocess import subprocess
import config
install_dependencies() install_dependencies()
import config
import psutil
import os import os
import psutil
import time import time
import log import log
import requests import requests