Giter Site home page Giter Site logo

Comments (5)

a34546 avatar a34546 commented on June 9, 2024

目前在服务停止时,主动断开连接,可以做到实时
app.Services.GetRequiredService().ApplicationStopping.Register(async () =>
{
await ConfigClient.Instance.DisconnectAsync();
});

from agileconfig.

kklldog avatar kklldog commented on June 9, 2024

按理是不需要的,正常关闭程序应该会触发Stop方法。https://github.com/kklldog/AgileConfig_Client/blob/ea66641f9175f30517ea5f45e0391f546ca81194/AgileConfig.Client/RegisterCenter/RegisterHostedService.cs#L40
控制台直接X掉好像不会触发该方法,所以不会实时下线。会等待30s心跳没回复后自动下线。

from agileconfig.

a34546 avatar a34546 commented on June 9, 2024

哦,那之前应该是我手动X掉控制台导致的没有及时更新.

from agileconfig.

a34546 avatar a34546 commented on June 9, 2024

等待30s心跳,这个可以配置吗?我想设置短一点

from agileconfig.

kklldog avatar kklldog commented on June 9, 2024

"serviceHealthCheckInterval": 15, // 服务健康检测的间隔时间,单位:秒
"serviceUnhealthInterval": 30, // 判断服务不健康的间隔,超出这个时间没响应过则认为不健康,单位:秒

这2个参数你调小一点

from agileconfig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.