def refresh_daemon_misc_settings(self): old_time = self.relay_usage_report_next_gen self.relay_usage_report_next_gen = next_schedule( self.relay_usage_report_span, self.relay_usage_report_day, self.relay_usage_report_hour) try: self.logger.debug("Refreshing misc settings") misc = db_retrieve_table_daemon(Misc, entry='first') self.opt_out_statistics = misc.stats_opt_out self.enable_upgrade_check = misc.enable_upgrade_check self.relay_usage_report_gen = misc.relay_usage_report_gen self.relay_usage_report_span = misc.relay_usage_report_span self.relay_usage_report_day = misc.relay_usage_report_day self.relay_usage_report_hour = misc.relay_usage_report_hour if (self.relay_usage_report_gen and old_time != self.relay_usage_report_next_gen): str_next_report = time.strftime( '%c', time.localtime(self.relay_usage_report_next_gen)) self.logger.debug( "Generating next output usage report {time_date}".format( time_date=str_next_report)) except Exception as except_msg: message = "Could not refresh misc settings:" \ " {err}".format(err=except_msg) self.logger.exception(message)
def refresh_daemon_misc_settings(self): old_time = self.output_usage_report_next_gen self.output_usage_report_next_gen = next_schedule( self.output_usage_report_span, self.output_usage_report_day, self.output_usage_report_hour) try: self.logger.debug("Refreshing misc settings") misc = db_retrieve_table_daemon(Misc, entry='first') self.opt_out_statistics = misc.stats_opt_out self.enable_upgrade_check = misc.enable_upgrade_check self.output_usage_report_gen = misc.output_usage_report_gen self.output_usage_report_span = misc.output_usage_report_span self.output_usage_report_day = misc.output_usage_report_day self.output_usage_report_hour = misc.output_usage_report_hour if (self.output_usage_report_gen and old_time != self.output_usage_report_next_gen): str_next_report = time.strftime( '%c', time.localtime(self.output_usage_report_next_gen)) self.logger.debug( "Generating next output usage report {time_date}".format( time_date=str_next_report)) except Exception as except_msg: message = "Could not refresh misc settings:" \ " {err}".format(err=except_msg) self.logger.exception(message)
def refresh_daemon_misc_settings(self): self.logger.debug("Refreshing misc settings") misc = db_retrieve_table_daemon(Misc, entry='first') self.opt_out_statistics = misc.stats_opt_out self.relay_usage_report_gen = misc.relay_usage_report_gen self.relay_usage_report_span = misc.relay_usage_report_span self.relay_usage_report_day = misc.relay_usage_report_day self.relay_usage_report_hour = misc.relay_usage_report_hour old_time = self.relay_usage_report_next_gen self.relay_usage_report_next_gen = next_schedule( self.relay_usage_report_span, self.relay_usage_report_day, self.relay_usage_report_hour) if (self.relay_usage_report_gen and old_time != self.relay_usage_report_next_gen): str_next_report = time.strftime( '%c', time.localtime(self.relay_usage_report_next_gen)) self.logger.debug( "Generating next relay usage report {time_date}".format( time_date=str_next_report))