Commentaires
This commit is contained in:
parent
2c68f0e8a5
commit
578a5c6372
@ -15,7 +15,8 @@ public class RedisService: IRedisService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version Pub/Sub
|
/// Version Pub/Sub - Redis en mode Pub/Sub ne garde pas ses messages en mémoire,
|
||||||
|
/// donc les commandes faites avant la souscription ne sont pas copiées.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public async Task<CanvasCommand?> Subscribe(CancellationToken cToken) {
|
public async Task<CanvasCommand?> Subscribe(CancellationToken cToken) {
|
||||||
var mess = await _channel.ReadAsync(cToken);
|
var mess = await _channel.ReadAsync(cToken);
|
||||||
@ -26,9 +27,10 @@ public class RedisService: IRedisService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version Pub/Sub
|
/// Version Pub/Sub - Redis en mode Pub/Sub ne garde pas ses messages en mémoire,
|
||||||
|
/// donc les commandes faites avant la souscription ne sont pas copiées.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="command"></param>
|
/// <param name="command">La commande à publier</param>
|
||||||
public async void Publish(CanvasCommand command) {
|
public async void Publish(CanvasCommand command) {
|
||||||
CanvasCommand cm = new(command);
|
CanvasCommand cm = new(command);
|
||||||
await _cache.GetSubscriber().PublishAsync(_channel.Channel, JsonConvert.SerializeObject(cm));
|
await _cache.GetSubscriber().PublishAsync(_channel.Channel, JsonConvert.SerializeObject(cm));
|
||||||
|
Loading…
Reference in New Issue
Block a user