@@ -69,6 +69,8 @@ def wrap(
6969 ** kwargs
7070 ):
7171 """ Wrapper to create our schedule and run it at the appropriate time """
72+ if interval == 0 :
73+ return
7274 scheduler = sched .scheduler (time .time , time .sleep )
7375 periodic (scheduler , interval , func )
7476 scheduler .run ()
@@ -79,83 +81,83 @@ def wrap(
7981
8082
8183@async_job ("CPU_Percentage" )
82- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['PERCENTAGE' ].get ("INTERVAL" , None )).total_seconds ())
84+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['PERCENTAGE' ].get ("INTERVAL" , 0 )).total_seconds ())
8385def CPUPercentage ():
8486 """ Refresh the CPU Percentage """
8587 # logger.debug("Refresh CPU Percentage")
8688 stats .CPU .percentage ()
8789
8890
8991@async_job ("CPU_Frequency" )
90- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['FREQUENCY' ].get ("INTERVAL" , None )).total_seconds ())
92+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['FREQUENCY' ].get ("INTERVAL" , 0 )).total_seconds ())
9193def CPUFrequency ():
9294 """ Refresh the CPU Frequency """
9395 # logger.debug("Refresh CPU Frequency")
9496 stats .CPU .frequency ()
9597
9698
9799@async_job ("CPU_Load" )
98- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['LOAD' ].get ("INTERVAL" , None )).total_seconds ())
100+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['LOAD' ].get ("INTERVAL" , 0 )).total_seconds ())
99101def CPULoad ():
100102 """ Refresh the CPU Load """
101103 # logger.debug("Refresh CPU Load")
102104 stats .CPU .load ()
103105
104106
105107@async_job ("CPU_Load" )
106- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['TEMPERATURE' ].get ("INTERVAL" , None )).total_seconds ())
108+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['TEMPERATURE' ].get ("INTERVAL" , 0 )).total_seconds ())
107109def CPUTemperature ():
108110 """ Refresh the CPU Temperature """
109111 # logger.debug("Refresh CPU Temperature")
110112 stats .CPU .temperature ()
111113
112114
113115@async_job ("CPU_FanSpeed" )
114- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['FAN_SPEED' ].get ("INTERVAL" , None )).total_seconds ())
116+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CPU' ]['FAN_SPEED' ].get ("INTERVAL" , 0 )).total_seconds ())
115117def CPUFanSpeed ():
116118 """ Refresh the CPU Fan Speed """
117119 # logger.debug("Refresh CPU Fan Speed")
118120 stats .CPU .fan_speed ()
119121
120122
121123@async_job ("GPU_Stats" )
122- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['GPU' ].get ("INTERVAL" , None )).total_seconds ())
124+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['GPU' ].get ("INTERVAL" , 0 )).total_seconds ())
123125def GpuStats ():
124126 """ Refresh the GPU Stats """
125127 # logger.debug("Refresh GPU Stats")
126128 stats .Gpu .stats ()
127129
128130
129131@async_job ("Memory_Stats" )
130- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['MEMORY' ].get ("INTERVAL" , None )).total_seconds ())
132+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['MEMORY' ].get ("INTERVAL" , 0 )).total_seconds ())
131133def MemoryStats ():
132134 # logger.debug("Refresh memory stats")
133135 stats .Memory .stats ()
134136
135137
136138@async_job ("Disk_Stats" )
137- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['DISK' ].get ("INTERVAL" , None )).total_seconds ())
139+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['DISK' ].get ("INTERVAL" , 0 )).total_seconds ())
138140def DiskStats ():
139141 # logger.debug("Refresh disk stats")
140142 stats .Disk .stats ()
141143
142144
143145@async_job ("Net_Stats" )
144- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['NET' ].get ("INTERVAL" , None )).total_seconds ())
146+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['NET' ].get ("INTERVAL" , 0 )).total_seconds ())
145147def NetStats ():
146148 # logger.debug("Refresh net stats")
147149 stats .Net .stats ()
148150
149151
150152@async_job ("Date_Stats" )
151- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['DATE' ].get ("INTERVAL" , None )).total_seconds ())
153+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['DATE' ].get ("INTERVAL" , 0 )).total_seconds ())
152154def DateStats ():
153155 # logger.debug("Refresh date stats")
154156 stats .Date .stats ()
155157
156158
157159@async_job ("Custom_Stats" )
158- @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CUSTOM' ].get ("INTERVAL" , None )).total_seconds ())
160+ @schedule (timedelta (seconds = config .THEME_DATA ['STATS' ]['CUSTOM' ].get ("INTERVAL" , 0 )).total_seconds ())
159161def CustomStats ():
160162 # print("Refresh custom stats")
161163 stats .Custom .stats ()
0 commit comments