service: PushFileService never recorded a file as sent.

Ansible modules were being resent continuously - but only the main
script module, and any custom modutils if any were present.

Wire footprint drops by ~1/3rd for a 500 task run of 'shell: hostname':

-rw-r--r-- 1 root root 584K Jan 31 22:06 500mito-before2
-rw-r--r-- 1 root root 434K Jan 31 22:04 500mito-filesbugonly
pull/564/head
David Wilson 6 years ago
parent 7ca927608c
commit d6c4a983e1

@ -634,7 +634,7 @@ class PushFileService(Service):
path=path, path=path,
context=context context=context
).close() ).close()
else: elif path not in sent:
child.call_service_async( child.call_service_async(
service_name=self.name(), service_name=self.name(),
method_name='store_and_forward', method_name='store_and_forward',
@ -642,6 +642,7 @@ class PushFileService(Service):
data=self._cache[path], data=self._cache[path],
context=context context=context
).close() ).close()
sent.add(path)
@expose(policy=AllowParents()) @expose(policy=AllowParents())
@arg_spec({ @arg_spec({

Loading…
Cancel
Save