diff options
author | James Lopez <james@jameslopez.es> | 2016-10-20 14:14:23 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 10:22:55 +0300 |
commit | 52e2729bf44ff3376071c2462679b46e9f67a44e (patch) | |
tree | 80df1a6370fe65ecd1fa83a66efe0fe8edf0e907 /app/workers/pipeline_metrics_worker.rb | |
parent | 1a4ff5d720fa0ec65f925ef381fced3d5f9a040f (diff) |
add pipeline id to merge request metrics table. Also, updated the pipeline worker to populate this field.
Diffstat (limited to 'app/workers/pipeline_metrics_worker.rb')
-rw-r--r-- | app/workers/pipeline_metrics_worker.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/pipeline_metrics_worker.rb b/app/workers/pipeline_metrics_worker.rb index 34f6ef161fb..cca39761d8f 100644 --- a/app/workers/pipeline_metrics_worker.rb +++ b/app/workers/pipeline_metrics_worker.rb @@ -12,11 +12,11 @@ class PipelineMetricsWorker private def update_metrics_for_active_pipeline(pipeline) - metrics(pipeline).update_all(latest_build_started_at: pipeline.started_at, latest_build_finished_at: nil) + metrics(pipeline).update_all(latest_build_started_at: pipeline.started_at, latest_build_finished_at: nil, ci_commit_id: pipeline.id) end def update_metrics_for_succeeded_pipeline(pipeline) - metrics(pipeline).update_all(latest_build_started_at: pipeline.started_at, latest_build_finished_at: pipeline.finished_at) + metrics(pipeline).update_all(latest_build_started_at: pipeline.started_at, latest_build_finished_at: pipeline.finished_at, ci_commit_id: pipeline.id) end def metrics(pipeline) |