Skip to content

Commit 22dc715

Browse files
committed
Merge remote-tracking branch 'origin/timestamp_restore_203'
2 parents dde86d9 + 7fe35b5 commit 22dc715

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/Controllers/Http/ParticipantController.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const { keyBy } = require('lodash')
4+
const formatISO9075 = require('date-fns/formatISO9075')
45
const { ModelNotFoundException } = require('@adonisjs/lucid/src/Exceptions')
56
const { validate } = use('Validator')
67

@@ -752,6 +753,8 @@ class ParticipantController {
752753
.firstOrFail()
753754

754755
const jobResultData = request.input('data')
756+
// Add timestamp field to data so multiple iterations of the same job can be discriminated by time
757+
jobResultData.timestamp = formatISO9075(new Date())
755758
const job = ptcp.getRelated('jobs').first()
756759
if (!job) {
757760
throw new ModelNotFoundException(`Cannot find job with ID ${jobID} for participant ${identifier}`)

0 commit comments

Comments
 (0)