autopkgtest: store the submission time when making requests

This is so that we can see more easily see if requests are stuck
master
Iain Lane 5 years ago
parent da5770559c
commit 4c27eadffa
No known key found for this signature in database
GPG Key ID: E352D5C51C5041D4

@ -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:

@ -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)

Loading…
Cancel
Save