ajitsing/gocd

Data refresh

Closed this issue · 3 comments

This may be a silly question but is there a way to get the pipeline status to update? I wrote a widget for Smashing to watch pipelines but I found that the statuses never change.

Digging around I found that in lib/gocd/pipeline_status/pipeline_repository.rb it looks as though all the data is collected once at the start and then never reloaded. Is this intended?

Hi @jrmhaig

When I created this gem, I had a different use case in mind hence you see that the data is cached. But I completely agree that the Repository should always return the latest status. I will make that change soon. Thanks for reporting this issue.

@jrmhaig the issue is resolved as part of Release 1.3 Let me know if you still face any issue. I will close the issue after you confirm the fix.

Thanks. That is working for me now.

After getting this working I now see that it is not showing when a pipeline is running so I have created a PR (#7). I realise that this may be too simplistic a solution but it is there in case you want to merge it.