Cleanup unused option (--usage-report-periodicity)

parent a612961e
...@@ -91,8 +91,6 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple): ...@@ -91,8 +91,6 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
help="The socket supervisor will use.") help="The socket supervisor will use.")
parser.add_argument("--supervisord-configuration-path", parser.add_argument("--supervisord-configuration-path",
help="The location where supervisord configuration will be stored.") help="The location where supervisord configuration will be stored.")
parser.add_argument("--usage-report-periodicity", type=int, default="24",
help="The periodicity of usage report sends, in hours.")
parser.add_argument("--buildout", default=None, parser.add_argument("--buildout", default=None,
help="Location of buildout binary.") help="Location of buildout binary.")
parser.add_argument("--pidfile", parser.add_argument("--pidfile",
...@@ -252,7 +250,6 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple): ...@@ -252,7 +250,6 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
supervisord_socket=option_dict['supervisord_socket'], supervisord_socket=option_dict['supervisord_socket'],
supervisord_configuration_path=option_dict[ supervisord_configuration_path=option_dict[
'supervisord_configuration_path'], 'supervisord_configuration_path'],
usage_report_periodicity=option_dict['usage_report_periodicity'],
key_file=key_file, key_file=key_file,
cert_file=cert_file, cert_file=cert_file,
master_ca_file=master_ca_file, master_ca_file=master_ca_file,
...@@ -348,7 +345,6 @@ class Slapgrid(object): ...@@ -348,7 +345,6 @@ class Slapgrid(object):
computer_id, computer_id,
supervisord_socket, supervisord_socket,
supervisord_configuration_path, supervisord_configuration_path,
usage_report_periodicity,
buildout, buildout,
key_file=None, key_file=None,
cert_file=None, cert_file=None,
...@@ -379,7 +375,6 @@ class Slapgrid(object): ...@@ -379,7 +375,6 @@ class Slapgrid(object):
self.computer_id = computer_id self.computer_id = computer_id
self.supervisord_socket = supervisord_socket self.supervisord_socket = supervisord_socket
self.supervisord_configuration_path = supervisord_configuration_path self.supervisord_configuration_path = supervisord_configuration_path
self.usage_report_periodicity = usage_report_periodicity
self.key_file = key_file self.key_file = key_file
self.cert_file = cert_file self.cert_file = cert_file
self.master_ca_file = master_ca_file self.master_ca_file = master_ca_file
...@@ -910,12 +905,6 @@ class Slapgrid(object): ...@@ -910,12 +905,6 @@ class Slapgrid(object):
else: else:
logger.debug("Usage report %r not found, ignored" % file_path) logger.debug("Usage report %r not found, ignored" % file_path)
#last_push_date = self.computer.getLastUsagePush()
#periodicity_timedelta = datetime.timedelta(
# self.usage_report_periodicity)
#if periodicity_timedelta + last_push_date < datetime.datetime.today():
# Pushes informations, if any
#After sending the aggregated file we remove all the valid xml reports #After sending the aggregated file we remove all the valid xml reports
for filename in filename_delete_list: for filename in filename_delete_list:
os.remove(os.path.join(dir_reports, filename)) os.remove(os.path.join(dir_reports, filename))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment