Exemple #1
0
        public async Task GetAllEnvironments()
        {
            var(environments, error) = await EnvsSvc.GetAllEnvironments().ConfigureAwait(false);

            if (error != null)
            {
                await SendErrorToCaller(error).ConfigureAwait(false);

                return;
            }

            await DispatchToCaller(MessageTypes.ENV_RECV_ALL, environments).ConfigureAwait(false);
        }
Exemple #2
0
        private async Task UpdateAvailableEnvironments()
        {
            var(environments, error) = await EnvsSvc.GetAllEnvironments().ConfigureAwait(false);

            if (error != null)
            {
                // Since this is a global update for anyone connected to the server, we don't
                // need to notify everyone when it fails. For now, we'll let the underlying
                // service log the error then not do anything for the clients.
                return;
            }

            Log.LogTrace("Updating all clients with {count} environments.", environments.Count);
            await DispatchToAll(MessageTypes.ENV_RECV_ALL, environments).ConfigureAwait(false);
        }