[erlang-questions] how: Purging old records from Mnesia table
Ulf Wiger (TN/EAB)
ulf.wiger@REDACTED
Thu Mar 6 15:25:16 CET 2008
Gleb Peregud skrev:
>
> After checking source of timer module i can see it is implemented
> using ordered_set ets table. This table is used as a queue and
> gen_server module is pulling data at necessary moments (it is the same
> as my idea in point 3). It seems to be a good choice :)
>
> Hence it is enough to use timer:send_after()
I don't know if it's what you're after, but I've been (slowly)
working on a scheduler module based on mnesia.
It's not ready, and wholly undocumented, but for those who
enjoy source-as-documentation, the work in progress can be
seen at:
http://erlhive.svn.sourceforge.net/viewvc/erlhive/trunk/lib/erlhive/src/erlhive_schedule.erl?view=markup
(It's in ErlHive, but there really isn't that much that's
erlhive-specific about it.)
The idea is that you should be able to register calendar-like
'appointments' - repeating if necessary - and tie them to actions that
are fired at the right moment.
BR,
Ulf W
More information about the erlang-questions
mailing list