von icon indicating copy to clipboard operation
von copied to clipboard

Some easy way to populate von keys with data from the past?

Open jumski opened this issue 11 years ago • 6 comments

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?

jumski avatar Jun 18 '13 14:06 jumski

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.

trvsdnn avatar Jun 18 '13 14:06 trvsdnn

Simplest thing i can think of will be faking time with something like timecop and then setting proper keys. Will it work?

jumski avatar Jun 19 '13 10:06 jumski

Yeah, that's what I was thinking and it should work.

trvsdnn avatar Jun 19 '13 13:06 trvsdnn

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 avatar Jul 31 '13 14:07 dipth

@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 avatar Aug 09 '13 05:08 bcaccinolo

@bcaccinolo exactly, it would then be a simple task of iterating over your database values and calling the increment_at method to seed redis

dipth avatar Aug 09 '13 07:08 dipth