From 4c27eadffa01bc1c084e947a7fa1e8a7509d1653 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 12 Nov 2019 23:46:30 +0000 Subject: [PATCH] autopkgtest: store the submission time when making requests This is so that we can see more easily see if requests are stuck --- britney2/policies/autopkgtest.py | 2 ++ run-autopkgtest | 2 ++ 2 files changed, 4 insertions(+) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 453850f..9c23d96 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -16,6 +16,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. +from datetime import datetime import os import json import tarfile @@ -615,6 +616,7 @@ class AutopkgtestPolicy(BasePolicy): qname = 'debci-huge-%s-%s' % (self.options.series, arch) else: qname = 'debci-%s-%s' % (self.options.series, arch) + params['submit-time'] = datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S%z') params = json.dumps(params) if self.amqp_channel: diff --git a/run-autopkgtest b/run-autopkgtest index c7000a4..15ab53f 100755 --- a/run-autopkgtest +++ b/run-autopkgtest @@ -1,6 +1,7 @@ #!/usr/bin/python3 # Request re-runs of autopkgtests for packages +from datetime import datetime import os import sys import argparse @@ -134,6 +135,7 @@ if __name__ == '__main__': params['requester'] = os.environ['SUDO_USER'] except KeyError: pass + params['submit-time'] = datetime.strftime(datetime.utcnow(), '%Y-%m-%d %H:%M:%S%z') params = '\n' + json.dumps(params) creds = urllib.parse.urlsplit(config.adt_amqp, allow_fragments=False)