set config location for loading profiles and load on start-up

This commit is contained in:
jbruce12000 2022-07-01 15:49:20 -04:00
parent 03b5bd9c26
commit 1e97db2e22
2 changed files with 2 additions and 1 deletions

View File

@ -172,5 +172,6 @@ automatic_restart_state_file = os.path.abspath(os.path.join(os.path.dirname( __f
# created a repo where anyone can contribute profiles. The objective is # created a repo where anyone can contribute profiles. The objective is
# to load profiles from this repository by default. # to load profiles from this repository by default.
# See https://github.com/jbruce12000/kiln-profiles # See https://github.com/jbruce12000/kiln-profiles
#kiln_profiles_directory = os.path.abspath(os.path.join(os.path.dirname( __file__ ),"storage", "profiles"))
kiln_profiles_directory = os.path.abspath(os.path.join(os.path.dirname( __file__ ),'..','kiln-profiles','pottery')) kiln_profiles_directory = os.path.abspath(os.path.join(os.path.dirname( __file__ ),'..','kiln-profiles','pottery'))

View File

@ -28,7 +28,7 @@ log.info("Starting kiln controller")
script_dir = os.path.dirname(os.path.realpath(__file__)) script_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, script_dir + '/lib/') sys.path.insert(0, script_dir + '/lib/')
profile_path = os.path.join(script_dir, "storage", "profiles") profile_path = config.kiln_profiles_directory
from oven import SimulatedOven, RealOven, Profile from oven import SimulatedOven, RealOven, Profile
from ovenWatcher import OvenWatcher from ovenWatcher import OvenWatcher