1
0

Ajouts du mode stream + ajouts QoL.

This commit is contained in:
MarcEricMartel
2023-11-18 12:19:37 -05:00
parent 4309ab9aad
commit 2bea742a69
3 changed files with 51 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ public class RedisService : IRedisService {
GROUP_NAME = "groupie",
SUB_NAME = "servant";
private NameValueEntry[] arnve = new NameValueEntry[1];
private NameValueEntry[] arNve = new NameValueEntry[1];
private IConnectionMultiplexer _cache;
private IDatabase _database;
@@ -55,8 +55,8 @@ public class RedisService : IRedisService {
}
public async void Produce(CanvasCommand command) {
arnve[0] = new NameValueEntry("command", JsonConvert.SerializeObject(command));
await _database.StreamAddAsync(STREAM_NAME, arnve);
arNve[0] = new NameValueEntry("command", JsonConvert.SerializeObject(command));
await _database.StreamAddAsync(STREAM_NAME, arNve);
}
public async Task<IEnumerable<CanvasCommand>> Consume() {