Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

Commit

Permalink
Mongo Interaction disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfranz committed Mar 27, 2018
1 parent d627866 commit 479e511
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion AnnelidaDispatcher/Model/DispatcherServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ public void HandleMessage(byte[] bytes, DispatcherClientObject state)
//Send data to DB in batches of 1s
if( (t - record.Timestamp).TotalSeconds > 1)
{
sensorDb.WriteSingleToCollection(record, missionName);
//Keep te entire logic the same but don't store
//sensorDb.WriteSingleToCollection(record, missionName);
record = new Record {Timestamp = t};
record.Sensors.Add(deserializedDocument);
}
Expand Down
2 changes: 1 addition & 1 deletion AnnelidaDispatcher/ViewModel/MainViewViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async void StartListening()

var sensorDb = new MongoWrapper(MongoUrl, SensorDbName);
var controlDb = new MongoWrapper(MongoUrl, ControlDbName);
disp = new DispatcherServer(sensorDb, controlDb, MissionName);
disp = new DispatcherServer(null, null, MissionName);
disp.ClientConnectedEvent += ClientConnected;
disp.ClientDisconnectedEvent += ClientDisconnected;
await Task.Run(() => disp.Start(9999));
Expand Down

0 comments on commit 479e511

Please sign in to comment.