Ema has uploaded a new change for review. https://gerrit.wikimedia.org/r/294063
Change subject: zerofetch.py: track successful executions ...................................................................... zerofetch.py: track successful executions Update the mtime of a "success-file" on successful runs. Bug: T132835 Change-Id: I9ae8b344bcc3c9a5209a982897ce86c51f93483a --- M modules/varnish/files/zerofetch.py 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/294063/1 diff --git a/modules/varnish/files/zerofetch.py b/modules/varnish/files/zerofetch.py index 310ebeb..e85adf6 100755 --- a/modules/varnish/files/zerofetch.py +++ b/modules/varnish/files/zerofetch.py @@ -136,5 +136,13 @@ os.rmdir(tempdir) +def update_success(fname): + """Update mtime of the given file""" + with open(fname, 'a'): + os.utime(fname, None) + if __name__ == "__main__": main() + # If no exception has been risen by main(), this has been a successful run. + # Update mtime of success file. + update_success("/var/cache/ocsp/.update-success") -- To view, visit https://gerrit.wikimedia.org/r/294063 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ae8b344bcc3c9a5209a982897ce86c51f93483a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ema <e...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits