Похожие чаты

Hello, I have a weird question to ask. I'm facing timing issues

while using .NET in a Docker Container:

An async method is called every full minute using a timer. However it happens that unpredictably, the method is sometimes called twice in the course of a minute and today, for the first time in 2 months, not at all 🤔

The code is running 24/7, does anybody have a clue if timing can be inaccurate in docker on vServers?

7 ответов

14 просмотров

Are you tackling exceptions that may be thrown during the running of such a method? If an exception gets thrown, your periodic execution can stop too depending on how you've written the code. Also, are you using BackgtoundServicd for running this method periodically?

Christoph- Автор вопроса
A X
Are you tackling exceptions that may be thrown dur...

I havent checked the logs yet, but yes, afaik, exceptions should be handled 🤔

Christoph- Автор вопроса
A X
Are you tackling exceptions that may be thrown dur...

https://github.com/SignorCC/CalendarListBot/blob/master/Program.cs

Christoph
https://github.com/SignorCC/CalendarListBot/blob/m...

It seems you're polling for updates via the Telegram Bot API. I wouldn't put semaphores and async/await in the same construct. There are much better ways of handling your expected usecase.

Christoph- Автор вопроса
A X
It seems you're polling for updates via the Telegr...

The minute passed should do nothing but send out notifications based on hh:mm

Christoph
The minute passed should do nothing but send out n...

Hmm, makes sense. You can use BackgroundService for this. Perfect fit and it'll only be running as a single instance. Avoid using semaphores in this context.

Christoph- Автор вопроса
A X
Hmm, makes sense. You can use BackgroundService f...

Could you point me in the right direction? i've never worked with them before

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта