Exemplo n.º 1
0
        public async Task UpdateClientConnectionTime(long id, string name, string mentorNode = null)
        {
            var command = new UpdateSubscriptionClientConnectionTime(_db.Name)
            {
                NodeTag                  = _serverStore.NodeTag,
                SubscriptionName         = name,
                LastClientConnectionTime = DateTime.UtcNow,
            };

            var(etag, _) = await _serverStore.SendToLeaderAsync(command);

            await _db.RachisLogIndexNotifications.WaitForIndexNotification(etag);
        }
Exemplo n.º 2
0
        public async Task UpdateClientConnectionTime(long id, string name, string mentorNode = null)
        {
            var command = new UpdateSubscriptionClientConnectionTime(_db.Name, RaftIdGenerator.NewId())
            {
                NodeTag = _serverStore.NodeTag,
                HasHighlyAvailableTasks  = _serverStore.LicenseManager.HasHighlyAvailableTasks(),
                SubscriptionName         = name,
                LastClientConnectionTime = DateTime.UtcNow
            };

            var(etag, _) = await _serverStore.SendToLeaderAsync(command);

            await _db.RachisLogIndexNotifications.WaitForIndexNotification(etag, _serverStore.Engine.OperationTimeout);
        }