von
von copied to clipboard
Some easy way to populate von keys with data from the past?
Hi!
I really like the whole idea. I have ~year of data that i would like to populate von keys with.
Do you guys have any easy way to do this, other than setting keys manually?
Currently no way to do this. I have thought about trying to handle this in some way, just haven't had time to figure out the best way to do it.
Simplest thing i can think of will be faking time with something like timecop and then setting proper keys. Will it work?
Yeah, that's what I was thinking and it should work.
How about being able to pass a time to the increment method, which will be used instead of the current time when storing the values to redis?
@dipth a kind of Von.increment_at(:my_counter, "2012-01-01") ? This feature would also be interesting to populate Von with seed data for testing.
@bcaccinolo exactly, it would then be a simple task of iterating over your database values and calling the increment_at
method to seed redis