fix: Remove unused variable 'schedules' and optimize garbage collection in schedule handling
This commit is contained in:
parent
6cd1349633
commit
cb274545a3
@ -537,7 +537,7 @@ class TempWebServer:
|
|||||||
if heater_monitor:
|
if heater_monitor:
|
||||||
heater_monitor.target_temp = config['heater_target']
|
heater_monitor.target_temp = config['heater_target']
|
||||||
heater_monitor.temp_swing = config['heater_swing']
|
heater_monitor.temp_swing = config['heater_swing']
|
||||||
del schedules, params, prev_schedules, prev
|
del params, prev_schedules, prev
|
||||||
gc.collect()
|
gc.collect()
|
||||||
# Send Discord notification
|
# Send Discord notification
|
||||||
try:
|
try:
|
||||||
@ -549,7 +549,8 @@ class TempWebServer:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
# ===== END: Handle schedule configuration save =====
|
# ===== END: Handle schedule configuration save =====
|
||||||
|
del schedules
|
||||||
|
gc.collect()
|
||||||
# Redirect back to homepage with cache-busting headers
|
# Redirect back to homepage with cache-busting headers
|
||||||
redirect_response = 'HTTP/1.1 303 See Other\r\n'
|
redirect_response = 'HTTP/1.1 303 See Other\r\n'
|
||||||
redirect_response += 'Location: /\r\n'
|
redirect_response += 'Location: /\r\n'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user