added: new logic for fake logs

This commit is contained in:
adobdin 2016-04-18 06:54:04 +00:00
parent b01083c4ce
commit c0b798481c
2 changed files with 6 additions and 4 deletions

View File

@ -96,9 +96,9 @@ def main(argv=None):
n.get_node_file_list()
n.calculate_log_size()
if n.is_enough_space(config.archives):
if not args.fake_logs:
n.create_log_archives(config.archives,
config.compress_timeout)
n.create_log_archives(config.archives,
config.compress_timeout,
fake=args.fake_logs)
lock.unlock()
else:
logging.warning('Unable to obtain lock %s, skipping "logs"-part' % lf)

View File

@ -575,7 +575,9 @@ class Nodes(object):
if code != 0:
logging.error("Can't create archive %s" % (errs))
def create_log_archives(self, outdir, timeout):
def create_log_archives(self, outdir, timeout, fake=False):
if fake:
return
threads = []
txtfl = []
for node in self.nodes.values():