Replay market data should loop without requiring restart of sparkd.
This commit is contained in:
1 parent
b8ab179a9d
commit
cdcf53435a
2 files changed
+7
-3
No files matched your search
@@ -51,8 +51,10 @@ namespace mbts.spark
|
||||
var rv = new SparkBusData.PersistedItems();
|
||||
try
|
||||
{
|
||||
byte[] data = File.ReadAllBytes(_loc);
|
||||
rv = SparkUtils.deserialize_proto<SparkBusData.PersistedItems>(data);
|
||||
if (File.Exists(_loc)) {
|
||||
byte[] data = File.ReadAllBytes(_loc);
|
||||
rv = SparkUtils.deserialize_proto<SparkBusData.PersistedItems>(data);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return rv;
|
||||
|
||||
@@ -48,7 +48,9 @@ void clean_dir(const std::string base_path) {
|
||||
void run_replay() {
|
||||
auto naggle_ms = config::get<RelayOptions>().naggle_ms();
|
||||
auto file = "http://mdreplay/spark/futures.coconut";
|
||||
replay_recording(file, naggle_ms);
|
||||
while(true) {
|
||||
replay_recording(file, naggle_ms);
|
||||
}
|
||||
}
|
||||
|
||||
void run_onixs() {
|
||||
|
||||
Reference in new issue
Block a user