Esempio n. 1
0
        public Task StopAsync(CancellationToken cancellationToken)
        {
            _mq.Unsubscribe(_options.AgentId);
            if (_dmq != null)
            {
                _dmq.Unsubscribe(_options.AgentId);
            }
            _isRunning = false;
            Logger.LogInformation($"下载器代理 {_options.AgentId} 退出");
#if NETFRAMEWORK
            return(DotnetSpider.Core.Framework.CompletedTask);
#else
            return(Task.CompletedTask);
#endif
        }
Esempio n. 2
0
        public Task StopAsync(CancellationToken cancellationToken)
        {
            Mq.Unsubscribe(Framework.DownloaderCenterTopic);
            if (Dmq != null)
            {
                Dmq.Unsubscribe(Framework.DownloaderCenterTopic);
            }
            _isRunning = false;
            Logger.LogInformation("下载中心退出");
#if NETFRAMEWORK
            return(Framework.CompletedTask);
#else
            return(Task.CompletedTask);
#endif
        }