unusual refresh behavior

1 view
Skip to first unread message

rellik

unread,
Apr 15, 2007, 1:37:55 AM4/15/07
to MOle Plugin
Consider the following scenario:

I have not used the main site for a while, and when I go to the mole
site (snitch), it shows "Sorry, no results".
Then, I go to the main side and perform a moleable action.
Now, when I go back to snitch, I should be able to refresh the page
and see the action reported, right? But it doesn't happen that way.
When I hit refresh, it comes back with "Sorry, no results".
A few seconds later it auto-refreshes, and now it shows the right
report, except that it still says "Sorry, no results" under the report-
line.

Weirder still, when I hit refresh again, the report disappears, and I
am back at only "Sorry, no results".

As I perform more requests, and manually refresh, 'tops' and the
graphs get updated, but not the report-lines. Those only get updated
with the auto-refresh.

Fernand Galiana

unread,
Apr 15, 2007, 2:06:50 AM4/15/07
to mole-...@googlegroups.com
Hi Patrick,

   Just curious does your site use the default utc timezone or some other
   timezone ? If so you may need to tune the snitch as it currently uses utc.
   Also if you used the filter form and set the time range to say last day do you
   now see the report with your latest moled actions ?

   Another thing you can try is looking into the snitch log and running the query by
   hand to make sure you get results back from the db.

   We may need to tune the existing snitch code base to cover the various scenarios.
   So please do report back...

-Fernand

rellik

unread,
Apr 15, 2007, 3:42:08 AM4/15/07
to MOle Plugin
A few comments:

### 1
No, I am not running at utc, which does indeed seem to be the
problem. Looking at the database transactions for manual- vs. auto-
refresh, there is the following difference:

WHERE (mole_logs.created_at > '2007-04-15 00:21:16')
WHERE (mole_logs.created_at > '2007-04-15 05:22:15')

so clearly in auto-refresh it is using the local time, but in the
other it is using utc, which is in the future.

### 2
Setting the filter uses utc, too, instead of server time.

### 3
Setting the filter turns the auto-refresh feature off. It's not clear
if this is intentionally or not, especially since you can turn it back
on by clicking on it.

On Apr 15, 1:06 am, "Fernand Galiana" <fernand.gali...@gmail.com>
wrote:


> Hi Patrick,
>
> Just curious does your site use the default utc timezone or some other
> timezone ? If so you may need to tune the snitch as it currently uses
> utc.
> Also if you used the filter form and set the time range to say last day
> do you
> now see the report with your latest moled actions ?
>
> Another thing you can try is looking into the snitch log and running the
> query by
> hand to make sure you get results back from the db.
>
> We may need to tune the existing snitch code base to cover the various
> scenarios.
> So please do report back...
>
> -Fernand
>

Fernand Galiana

unread,
Apr 15, 2007, 3:57:54 AM4/15/07
to mole-...@googlegroups.com
See annotations...

On 4/15/07, rellik <patrick...@gmail.com> wrote:

A few comments:

### 1
No, I am not running at utc, which does indeed seem to be the
problem.  Looking at the database transactions for manual- vs. auto-
refresh, there is the following difference:

WHERE (mole_logs.created_at > '2007-04-15 00:21:16')
WHERE (mole_logs.created_at > '2007-04-15 05:22:15')

so clearly in auto-refresh it is using the local time, but in the
other it is using utc, which is in the future.

Correct when you refresh the browser by hand, the snitch will
use the server time and gather logs for the last hour. During
auto-refresh it fetches the time of the last message so it can
push out the log deltas back to the browser.
If your are not using utc you will need to adjust the code in the
fetch_log action to adjust for your server timezone..


### 2
Setting the filter uses utc, too, instead of server time.

Same as above...

### 3
Setting the filter turns the auto-refresh feature off.  It's not clear
if this is intentionally or not, especially since you can turn it back
on by clicking on it.

Yes by design, once you hit the filter form we automatically turn auto refresh off.
You can, as you point out, toggle the auto refresh

rellik

unread,
Apr 15, 2007, 4:09:35 AM4/15/07
to MOle Plugin
Thanks, all fixed.

snitch/app/controllers:
last_pull = @filter.range.minutes.ago if last_pull.nil? or force
#last_pull = @filter.range.minutes.ago.utc if last_pull.nil? or
force


On Apr 15, 2:57 am, "Fernand Galiana" <fernand.gali...@gmail.com>
wrote:
> See annotations...

Fernand Galiana

unread,
Apr 15, 2007, 4:13:04 AM4/15/07
to mole-...@googlegroups.com
Excellent !! Glad to hear it...

Thanks for hanging with us, your are on your way...

-Fernand

On 4/15/07, rellik < patrick...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages