From 60f2ab3d96118e0e90fe1ba16e5446aff6eed2b7 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Thu, 6 Dec 2012 20:00:24 +0400 Subject: [PATCH] #759: some fixes --- app/models/build_list.rb | 4 +++- lib/abf_worker/model_helper.rb | 2 +- lib/abf_worker/rpm_worker_observer.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 0120a86b2..accdb73f9 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -322,6 +322,7 @@ class BuildList < ActiveRecord::Base end def human_duration + duration ||= current_duration I18n.t("layout.build_lists.human_duration", {:hours => (duration/3600).to_i, :minutes => (duration%3600/60).to_i}) end @@ -391,7 +392,8 @@ class BuildList < ActiveRecord::Base :commit_hash => commit_hash, :build_requires => build_requires, :include_repos => include_repos_hash, - :bplname => build_for_platform.name + :bplname => build_for_platform.name, + :user => {:uname => user.uname, :email => user.email} } end diff --git a/lib/abf_worker/model_helper.rb b/lib/abf_worker/model_helper.rb index fd58c17e5..b9f6fc323 100644 --- a/lib/abf_worker/model_helper.rb +++ b/lib/abf_worker/model_helper.rb @@ -29,7 +29,7 @@ module AbfWorker worker_queue_class, abf_worker_args ) - if deleted + if deleted == 1 update_attributes({:status => self.class::BUILD_CANCELED}) else send_stop_signal diff --git a/lib/abf_worker/rpm_worker_observer.rb b/lib/abf_worker/rpm_worker_observer.rb index 48a21726d..10b4c1c7a 100644 --- a/lib/abf_worker/rpm_worker_observer.rb +++ b/lib/abf_worker/rpm_worker_observer.rb @@ -63,4 +63,4 @@ module AbfWorker end end -endх \ No newline at end of file +end \ No newline at end of file