Skip to content

Commit

Permalink
Remove comment and don't replace jobId with job name
Browse files Browse the repository at this point in the history
  • Loading branch information
maeb committed Apr 21, 2021
1 parent edbc623 commit a458a4c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/rethinkdb/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,8 @@ func (qc *Query) WalkLatestJobExecutionForCrawlJobs(ctx context.Context, fn func
OrderBy(r.OrderByOpts{Index: r.Desc("jobId_startTime")}).
Between([]r.Term{job.Field("id"), r.MinVal}, []r.Term{job.Field("id"), r.MaxVal}).
Limit(1).
// replace jobId with job name
// .map(d => d.merge({
// executionsState: d('executionsState').concatMap(_ => _.coerceTo('array')).coerceTo('object')
// }))
Map(func(jes r.Term) interface{} {
return jes.Merge(map[string]interface{}{
"jobId": job.Field("meta").Field("name"),
"executionsState": jes.Field("executionsState").
ConcatMap(func(state r.Term) interface{} {
return state.CoerceTo("array")
Expand Down

0 comments on commit a458a4c

Please sign in to comment.