On 08/10/10 - 04:23:38PM, [email protected] wrote:
> From: Jan Provaznik <[email protected]>
> 
> For now condor supports only 'on-demand' state syncing, so
> we have to sync state at least when listing instances.
> condormatic_instances_sync_states method is already called when
> listing instances in a pool, but we should sync state also when
> listing all instances, shouldn't we?
> ---
>  src/app/controllers/instance_controller.rb |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/src/app/controllers/instance_controller.rb 
> b/src/app/controllers/instance_controller.rb
> index fcb237e..e94eea9 100644
> --- a/src/app/controllers/instance_controller.rb
> +++ b/src/app/controllers/instance_controller.rb
> @@ -32,6 +32,9 @@ class InstanceController < ApplicationController
>    def index
>      require_privilege(Privilege::INSTANCE_VIEW)
>  
> +    # go to condor and sync the database to the real instance states
> +    condormatic_instances_sync_states
> +
>      @order_dir = params[:order_dir] == 'desc' ? 'desc' : 'asc'
>      @order = params[:order] || 'name'
>      @instances = Instance.search_filter(params[:search], 
> Instance::SEARCHABLE_COLUMNS).paginate(

Yes, this seems reasonable enough to me.  Even when we get to the point where
we are syncing state from condor on a regular basis, it is still good to do a
refresh before showing the user some data.  The one potential downside is if
condor is remote, this could block the main UI, but I think we should cross
that bridge when we come to it.

ACK

-- 
Chris Lalancette
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to