GetHighestTimestampForActor is superfluous

Bug #489186 reported by Mikkel Kamstrup Erlandsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Medium
Mikkel Kamstrup Erlandsen

Bug Description

The method GetHighestTimestampForActor is superfluous as far as I can tell. It can be simply done fully client side by using FindEventIds like so:

template = Event.new_for_values(actor="gedit")
ids = FindEventIds(TimeRange.until_now(), [template], StorageState.Any, 1, ResultType.MostRecentEvents)
highest_timestamp_for_gedit = GetEvents(ids)[0].timestamp

If I am right about this then I think we should remove it from the DBus API an simply implement a convenience method in ZeitgeistClient.

Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: [Zeitgeist] [Bug 489186] [NEW] GetHighestTimestampForActor is superfluous

2009/11/27 Mikkel Kamstrup Erlandsen <email address hidden>:
> It can be simply done fully client side by using FindEventIds like
> so:

Yes, there is even a comment in the source code saying this. I added
it as a convenience method for C applications (where getting it isn't
as easy as from Python), but I'm OK with removing it.

--
Siegfried-Angel Gevatter Pujals (RainCT)
Free Software Developer 363DEAE3

Changed in zeitgeist:
status: New → Triaged
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → Medium
milestone: none → 0.3.0
Revision history for this message
Markus Korn (thekorn) wrote :

Yeah, I'm ok with removing this method from the dbus API.
I would be cool if we could add a more flexible method to ZeitgeistClient, like

  ZeitgeistClient.get_max_timestamp(self, actor=None, manifestation=None, interpretation=None)

so you can not only search for the last timestamp for an actor, but also for an interpretation or manifestation.
And sth. like

  ZeitgeistClient.get_max_timestamp(self, actor="application://geany", interpretation=Interpretation.CREATE_EVENT)

will return the last timestamp where a file was created using geany.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

I removed this method some time before we released 0.3.0. Marking as Fix Released

Changed in zeitgeist:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.