View does not get updated values from database and required one refresh

I am updating database in the background but i am getting one problem where
when view is opened and if database updated in the and afterward

if i call to the action just afterwards then my view does not get updated
value until unless it refreshed once.

Thanks,
Aditya

> I am updating database in the background but i am getting one problem where
> when view is opened and if database updated in the and afterward
> if i call to the action just afterwards then my view does not get updated
> value until unless it refreshed once.

Hello, what you mean by view? Rails view page? And value? What value?
Can you be more specific?

··· -- Later, Lukas #lzap Zapletal

Hi Lukas,

Yes I meant to say rails view and values are coming from database .

I have one foreman-rake task , that updates database in the background with
the help of scheduler.

And i am using view to display that values.

Problem:

If My foreman page opened that time and database update in the background.

Just after that when i tried to open that view it does not display any
value .but when i refreshed view then afterwards i will get updated value.

So for me it required at least one refresh or move to some different menu
item and back again to get updated values.

Hope so now you can answer.

Thanks,
Aditya

··· On Monday, November 23, 2015 at 5:07:53 PM UTC+5:30, Lukas Zapletal wrote: > > > I am updating database in the background but i am getting one problem > where > > when view is opened and if database updated in the and afterward > > if i call to the action just afterwards then my view does not get > updated > > value until unless it refreshed once. > > Hello, what you mean by view? Rails view page? And value? What value? > Can you be more specific? > > -- > Later, > Lukas #lzap Zapletal >

> Hope so now you can answer.

Not at all :slight_smile: I apologize, but I don't follow.

If that task does some SQL transactions, you won't see the results until
the change is committed to the database. But I am shooting in the dark
here.

··· -- Later, Lukas #lzap Zapletal

I reproduced this issue many times and also checked database always
contains the values.

Thanks,
Aditya

··· On Monday, November 23, 2015 at 8:37:41 PM UTC+5:30, Lukas Zapletal wrote: > > > Hope so now you can answer. > > Not at all :-) I apologize, but I don't follow. > > If that task does some SQL transactions, you won't see the results until > the change is committed to the database. But I am shooting in the dark > here. > > -- > Later, > Lukas #lzap Zapletal >