Last active
December 30, 2015 23:39
-
-
Save mlusiak/7902309 to your computer and use it in GitHub Desktop.
Saving some stuff into redis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type BitstampLast = {Id:int64; Timestamp:int; Value:decimal} | |
let redis = new RedisClient("localhost") | |
redis.FlushAll() | |
let redisBitstamp = redis.As<BitstampLast>() | |
let cp = currentPrice() | |
let last = {Id = redisBitstamp.GetNextSequence(); Timestamp = fst cp; Value = snd cp} | |
let stored = redisBitstamp.Store(last) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type BitstampLast = {mutable Id:int64; mutable Timestamp:int; mutable Value:decimal} | |
let redis = new RedisClient("localhost") | |
redis.FlushAll() | |
let redisBitstamp = redis.As<BitstampLast>() | |
let cp = currentPrice() | |
let last = {Id = redisBitstamp.GetNextSequence(); Timestamp = fst cp; Value = snd cp} | |
let stored = redisBitstamp.Store(last) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<CLIMutable>] | |
type BitstampLast = {Id:int64; Timestamp:int; Value:decimal} | |
let redis = new RedisClient("localhost") | |
redis.FlushAll() | |
let redisBitstamp = redis.As<BitstampLast>() | |
let cp = currentPrice() | |
let last = {Id = redisBitstamp.GetNextSequence(); Timestamp = fst cp; Value = snd cp} | |
let stored = redisBitstamp.Store(last) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment