Cache systemd unit update check per unit, closes #34927

This commit is contained in:
Ivan Babrou 2016-07-28 16:41:19 +01:00
parent 65fba5b4d7
commit c300615e9d
No known key found for this signature in database
GPG key ID: DBF6C142408CB4F0

View file

@ -70,7 +70,7 @@ def _check_for_unit_changes(name):
Check for modified/updated unit files, and run a daemon-reload if any are
found.
'''
contextkey = 'systemd._check_for_unit_changes'
contextkey = 'systemd._check_for_unit_changes.{0}'.format(name)
if contextkey not in __context__:
if _untracked_custom_unit_found(name) or _unit_file_changed(name):
systemctl_reload()