dotnetomaniak.pl - Artykuły z tagiem Hangfiredotnetomaniak.pl - Artykuły z tagiem Hangfire2024-03-28T11:12:25Zhttps://dotnetomaniak.pl/Tags/HangfireCopyright (c) dotnetomaniak.pldotnetomaniak.pl Atom Generatordotnetomaniak.pl webmasteradmin@dotnetomaniak.plhttps://dotnetomaniak.pl/Assets/Images/fav.icohttps://dotnetomaniak.pl/Assets/Images/dotnetomaniak_logo-negatyw_small.png9025https://dotnetomaniak.pl/Jak-ponawiac-operacje-w-NET-z-wykorzystaniem-Polly-Blog-Daniela-PlawgoJak ponawiać operacje w .NET z wykorzystaniem Polly? - Blog Daniela Plawgo2018-09-05T03:25:16Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_uK9Dot0yZkqXAkf-eFNzkw.png"/></div><div>W aplikacjach bardzo często używamy zewnętrznych zasobów. A to trzeba wykonać zapytanie na bazie danych. Pobrać dane z usługi lub wysłać wiadomość email. Zasoby te charakteryzują się tym, że mogą być przez jakiś czas niedostępne, bo na przykład wystąpił jakiś problem z siecią lub zasób jest zbyt mocno obciążony. W takich sytuacjach zastanawiamy się, czy od razu pokazać użytkownikowi informacje o błędzie, czy może spróbować ponowić operację po jakimś czasie i do...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Jak-ponawiac-operacje-w-NET-z-wykorzystaniem-Polly-Blog-Daniela-Plawgo"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=https%3a%2f%2fplawgo.pl%2f2018%2f09%2f04%2fjak-ponawiac-operacje-w-net-z-wykorzystaniem-polly%2f" style="border:0px"/></a></div></div>danielplawgohttps://dotnetomaniak.pl/Users/2gpSr8DDgU2Y9-iey0Z9mw2018-09-06T07:23:49Zhttps://dotnetomaniak.pl/Jak-ponawiac-operacje-w-NET-z-wykorzystaniem-Polly-Blog-Daniela-Plawgo92400W aplikacjach bardzo często używamy zewnętrznych zasobów. A to trzeba wykonać zapytanie na bazie danych. Pobrać dane z usługi lub wysłać wiadomość email. Zasoby te charakteryzują się tym, że mogą być przez jakiś czas niedostępne, bo na przykład wystąpił jakiś problem z siecią lub zasób jest zbyt mocno obciążony. W takich sytuacjach zastanawiamy się, czy od razu pokazać użytkownikowi informacje o błędzie, czy może spróbować ponowić operację po jakimś czasie i do...https://plawgo.pl/2018/09/04/jak-ponawiac-operacje-w-net-z-wykorzystaniem-polly/http://dotnetomaniak.pl/Data/Thumbnails/small_uK9Dot0yZkqXAkf-eFNzkw.pnghttps://dotnetomaniak.pl/Testowanie-wysylki-email-w-ASPNET-MVC-Blog-Daniela-PlawgoTestowanie wysyłki email w ASP.NET MVC - Blog Daniela Plawgo2018-06-28T03:51:53Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_pMZlfulDgUex4fQHaHwEzw.png"/></div><div>W poprzednich dwóch postach (Postal – wysyłka email w ASP.NET MVC oraz Hangfire – wysyłka email w tle) pokazałem jak wysyłać wiadomości email w aplikacji ASP.NET MVC. Jeśli nie czytałeś/czytałaś tamtym wpisów, to zachęcam do nadrobienia lektury, szczególnie, że w tym wpisie będę bazował na kodzie, z tamtych wpisów. W dzisiejszym poście chciałbym jeszcze pozostać przy tej tematyce i pokaże Ci, w jaki sposób można automatycznie testować kod odpowiedzialny za wysy...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Testowanie-wysylki-email-w-ASPNET-MVC-Blog-Daniela-Plawgo"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=https%3a%2f%2fplawgo.pl%2f2018%2f06%2f27%2ftestowanie-wysylki-email-w-asp-net-mvc%2f" style="border:0px"/></a></div></div>danielplawgohttps://dotnetomaniak.pl/Users/2gpSr8DDgU2Y9-iey0Z9mw2018-07-04T06:54:44Zhttps://dotnetomaniak.pl/Testowanie-wysylki-email-w-ASPNET-MVC-Blog-Daniela-Plawgo4810W poprzednich dwóch postach (Postal – wysyłka email w ASP.NET MVC oraz Hangfire – wysyłka email w tle) pokazałem jak wysyłać wiadomości email w aplikacji ASP.NET MVC. Jeśli nie czytałeś/czytałaś tamtym wpisów, to zachęcam do nadrobienia lektury, szczególnie, że w tym wpisie będę bazował na kodzie, z tamtych wpisów. W dzisiejszym poście chciałbym jeszcze pozostać przy tej tematyce i pokaże Ci, w jaki sposób można automatycznie testować kod odpowiedzialny za wysy...https://plawgo.pl/2018/06/27/testowanie-wysylki-email-w-asp-net-mvc/http://dotnetomaniak.pl/Data/Thumbnails/small_pMZlfulDgUex4fQHaHwEzw.pnghttps://dotnetomaniak.pl/Hangfire-wysylka-email-w-tle-Blog-Daniela-PlawgoHangfire - wysyłka email w tle - Blog Daniela Plawgo2018-06-21T03:40:38Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_VUEcLaw9YESQpZGwMI1S4Q.png"/></div><div>W poprzednim wpisie pokazałem jak w aplikacji ASP.NET MVC wysyłać wiadomości email z wykorzystaniem biblioteki Postal. Wspomniałem również, że wysyłka email w ramach żądania HTTP nie jest dobrym pomysłem, że lepiej skorzystać z jakiego mechanizmu kolejek oraz ponawiania operacji. Jednym z dostępnych narzędzi jest biblioteka Hangfire, która w prosty sposób jest wstanie wysłać email w tle, a do tego ponowić operację w momencie wystąpienia błędu.Hangfire
Ostatnio do kolejkow...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Hangfire-wysylka-email-w-tle-Blog-Daniela-Plawgo"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=https%3a%2f%2fplawgo.pl%2f2018%2f06%2f20%2fhangfire-wysylka-email-w-tle%2f" style="border:0px"/></a></div></div>danielplawgohttps://dotnetomaniak.pl/Users/2gpSr8DDgU2Y9-iey0Z9mw2018-06-29T05:45:55Zhttps://dotnetomaniak.pl/Hangfire-wysylka-email-w-tle-Blog-Daniela-Plawgo31360W poprzednim wpisie pokazałem jak w aplikacji ASP.NET MVC wysyłać wiadomości email z wykorzystaniem biblioteki Postal. Wspomniałem również, że wysyłka email w ramach żądania HTTP nie jest dobrym pomysłem, że lepiej skorzystać z jakiego mechanizmu kolejek oraz ponawiania operacji. Jednym z dostępnych narzędzi jest biblioteka Hangfire, która w prosty sposób jest wstanie wysłać email w tle, a do tego ponowić operację w momencie wystąpienia błędu.Hangfire
Ostatnio do kolejkow...https://plawgo.pl/2018/06/20/hangfire-wysylka-email-w-tle/http://dotnetomaniak.pl/Data/Thumbnails/small_VUEcLaw9YESQpZGwMI1S4Q.pnghttps://dotnetomaniak.pl/Dont-do-it-now-Part-6-Hangfire-details-recurring-jobs-and-cron-expressions-IndexOutOfRange[EN] Don't do it now! Part 6. Hangfire details - recurring jobs and cron expressions – IndexOutOfRange2016-09-22T19:23:12Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_9Z8D2OoJ4kG8EYhsei0Cjw.png"/></div><div>Reading time ~6 minutes
This is a sixth part of a series:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellationpart 5 - Job continuation with ContinueWithpart 6 - Recurring jobs and cron expressions
Parts 3, 4, and 5 covered the BackgroundJob class responsible for enqueuing single jobs (fire and forget). This post will cover RecurringJob class exposing API for recurring jobs (as the name ...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Dont-do-it-now-Part-6-Hangfire-details-recurring-jobs-and-cron-expressions-IndexOutOfRange"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2findexoutofrange.com%2fDon%27t-do-it-now!-Part-6.-Hangfire-recurring-jobs%2f" style="border:0px"/></a></div></div>maklipsahttps://dotnetomaniak.pl/Users/31yXhXxtM0GtdEekLLT8yw2016-10-01T13:41:26Zhttps://dotnetomaniak.pl/Dont-do-it-now-Part-6-Hangfire-details-recurring-jobs-and-cron-expressions-IndexOutOfRange2440Reading time ~6 minutes
This is a sixth part of a series:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellationpart 5 - Job continuation with ContinueWithpart 6 - Recurring jobs and cron expressions
Parts 3, 4, and 5 covered the BackgroundJob class responsible for enqueuing single jobs (fire and forget). This post will cover RecurringJob class exposing API for recurring jobs (as the name ...http://indexoutofrange.com/Don't-do-it-now!-Part-6.-Hangfire-recurring-jobs/http://dotnetomaniak.pl/Data/Thumbnails/small_9Z8D2OoJ4kG8EYhsei0Cjw.pnghttps://dotnetomaniak.pl/ENDont-do-it-now-Part-5-Hangfire-details-job-continuation-with-ContinueWith-IndexOutOfRange[EN]Don't do it now! Part 5. Hangfire details - job continuation with ContinueWith – IndexOutOfRange2016-09-14T13:52:01Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_AwQmsWszrUaBkiuSkh9RmA.png"/></div><div>Reading time ~3 minutes
This is a fifth part of a series:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellationpart 5 - Job continuation with ContinueWithpart 6 - Recurring jobs and cron expressions
Part 3 covered almost all functions in BackgroundJob class except for ContinueWith functions family. So here we go :)
The fact that it has the same name as a System.Threading.Tasks.Task funct...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/ENDont-do-it-now-Part-5-Hangfire-details-job-continuation-with-ContinueWith-IndexOutOfRange"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2findexoutofrange.com%2fDon%27t-do-it-now!-Part-5.-Hangfire-job-continuation%2c-ContinueWith%2f" style="border:0px"/></a></div></div>maklipsahttps://dotnetomaniak.pl/Users/31yXhXxtM0GtdEekLLT8yw2016-09-24T10:28:36Zhttps://dotnetomaniak.pl/ENDont-do-it-now-Part-5-Hangfire-details-job-continuation-with-ContinueWith-IndexOutOfRange1760Reading time ~3 minutes
This is a fifth part of a series:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellationpart 5 - Job continuation with ContinueWithpart 6 - Recurring jobs and cron expressions
Part 3 covered almost all functions in BackgroundJob class except for ContinueWith functions family. So here we go :)
The fact that it has the same name as a System.Threading.Tasks.Task funct...http://indexoutofrange.com/Don't-do-it-now!-Part-5.-Hangfire-job-continuation,-ContinueWith/http://dotnetomaniak.pl/Data/Thumbnails/small_AwQmsWszrUaBkiuSkh9RmA.pnghttps://dotnetomaniak.pl/Dont-do-it-now-Part-4-Hangfire-details-dashboard-retries-and-job-cancellation-IndexOutOfRange[EN] Don't do it now! Part 4. Hangfire details - dashboard, retries and job cancellation – IndexOutOfRange2016-09-07T16:19:41Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_H2wGJwKGyEmg6AzmJQqbEQ.png"/></div><div>Reading time ~3 minutes
This is the fourth part of a series discussing job scheduling and Hangfire details:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellation
This part will cover few small topics:dashboardretriesmore technical part of the Hangfire.BackgroundJob class APIjob cancellationDashboard
Let’s start with the administrative dashboard because it gives a good background for the ...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Dont-do-it-now-Part-4-Hangfire-details-dashboard-retries-and-job-cancellation-IndexOutOfRange"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2findexoutofrange.com%2fDon%27t-do-it-now!-Part-4.-Hangfire-details-dashboard%2c-retries-and-job-cancellation%2f" style="border:0px"/></a></div></div>maklipsahttps://dotnetomaniak.pl/Users/31yXhXxtM0GtdEekLLT8yw2016-09-17T05:15:20Zhttps://dotnetomaniak.pl/Dont-do-it-now-Part-4-Hangfire-details-dashboard-retries-and-job-cancellation-IndexOutOfRange1540Reading time ~3 minutes
This is the fourth part of a series discussing job scheduling and Hangfire details:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellation
This part will cover few small topics:dashboardretriesmore technical part of the Hangfire.BackgroundJob class APIjob cancellationDashboard
Let’s start with the administrative dashboard because it gives a good background for the ...http://indexoutofrange.com/Don't-do-it-now!-Part-4.-Hangfire-details-dashboard,-retries-and-job-cancellation/http://dotnetomaniak.pl/Data/Thumbnails/small_H2wGJwKGyEmg6AzmJQqbEQ.pnghttps://dotnetomaniak.pl/Dont-do-it-now-Part-3-Hangfire-details-jobs-Joby-asynchroniczne-w-tle-z-Hangfire-IndexOutOfRange[EN] Don't do it now! Part 3. Hangfire details - jobs | Joby asynchroniczne w tle z Hangfire – IndexOutOfRange2016-08-23T11:53:14Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_zpknVntgikqbavxK15quGQ.png"/></div><div>Reading time ~2 minutes
This is the third part of a series discussing job scheduling and Hangfire details:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellation
This part will focus on the basic scheduling API of Hangfire. The easiest way to create a fire and forget job is by using the classHangfire.BackgroundJob and its minimalistic (and this is a complement) API of static functions:Enqu...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Dont-do-it-now-Part-3-Hangfire-details-jobs-Joby-asynchroniczne-w-tle-z-Hangfire-IndexOutOfRange"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2findexoutofrange.com%2fDon%27t-do-it-now!-Part-3.-Hangfire-details-jobs%2f" style="border:0px"/></a></div></div>maklipsahttps://dotnetomaniak.pl/Users/31yXhXxtM0GtdEekLLT8yw2016-08-30T18:18:50Zhttps://dotnetomaniak.pl/Dont-do-it-now-Part-3-Hangfire-details-jobs-Joby-asynchroniczne-w-tle-z-Hangfire-IndexOutOfRange1960Reading time ~2 minutes
This is the third part of a series discussing job scheduling and Hangfire details:part 1 - Why schedule and procrastinate jobs?part 2 - Overview of Hangfiepart 3 - Scheduling and Queuing jobs in Hangfirepart 4 - Dashboard, retries and job cancellation
This part will focus on the basic scheduling API of Hangfire. The easiest way to create a fire and forget job is by using the classHangfire.BackgroundJob and its minimalistic (and this is a complement) API of static functions:Enqu...http://indexoutofrange.com/Don't-do-it-now!-Part-3.-Hangfire-details-jobs/http://dotnetomaniak.pl/Data/Thumbnails/small_zpknVntgikqbavxK15quGQ.pnghttps://dotnetomaniak.pl/Dont-do-it-now-Part-2-Background-tasks-job-queuing-and-scheduling-with-Hangfire-IndexOutOfRangeDon't do it now! Part 2. Background tasks, job queuing and scheduling with Hangfire – IndexOutOfRange2016-08-11T06:02:26Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small__Bvju2PxW0OyaCSbRSil9Q.png"/></div><div>Reading time ~2 minutes
In the previous post I’ve wrote about why I think the ability to schedule tasks for later execution is a fundamental technical feature, but also a must have from a business point of view. We are passed the whys, so lets get to the hows. The answer is simple - Hangfire. I’ve wrote about it here, here and here, so yeah, I like it. Hangfire is an amazing library. It has proved itself in my pet project (cookit.pl) and in a huge ERP system that we are building at work, where we repla...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Dont-do-it-now-Part-2-Background-tasks-job-queuing-and-scheduling-with-Hangfire-IndexOutOfRange"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2findexoutofrange.com%2fDon%27t-do-it-now!-Part-2.-Background-tasks%2c-job-queuing-and-scheduling-with-Hangfire%2f" style="border:0px"/></a></div></div>maklipsahttps://dotnetomaniak.pl/Users/31yXhXxtM0GtdEekLLT8yw2016-08-19T06:59:36Zhttps://dotnetomaniak.pl/Dont-do-it-now-Part-2-Background-tasks-job-queuing-and-scheduling-with-Hangfire-IndexOutOfRange21510Reading time ~2 minutes
In the previous post I’ve wrote about why I think the ability to schedule tasks for later execution is a fundamental technical feature, but also a must have from a business point of view. We are passed the whys, so lets get to the hows. The answer is simple - Hangfire. I’ve wrote about it here, here and here, so yeah, I like it. Hangfire is an amazing library. It has proved itself in my pet project (cookit.pl) and in a huge ERP system that we are building at work, where we repla...http://indexoutofrange.com/Don't-do-it-now!-Part-2.-Background-tasks,-job-queuing-and-scheduling-with-Hangfire/http://dotnetomaniak.pl/Data/Thumbnails/small__Bvju2PxW0OyaCSbRSil9Q.pnghttps://dotnetomaniak.pl/Local-optimizations-dont-add-up-IndexOutOfRange[EN] Local optimizations don't add up – IndexOutOfRange2016-05-19T20:57:50Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_JmTnSSi8I0mQqx44I9EEPQ.png"/></div><div>One of the main processes in cookit is dealing with extracting recipe information from raw html. I know it isn’t the most elegant solution but it is the only universal one.
But to the point.
Every web page goes through a process involving html parsing, stemming, parsing, and n-gram token matching. Then it’s saved to Sql Server and after transformation to Solr. So a lot of string manipulation, math calculations and from time to time mostly 0-gen GC.
In the most pessimistic case this process has to be r...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Local-optimizations-dont-add-up-IndexOutOfRange"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2findexoutofrange.com%2fLocalOptimizationsDontAddUp%2f" style="border:0px"/></a></div></div>maklipsahttps://dotnetomaniak.pl/Users/31yXhXxtM0GtdEekLLT8yw2016-05-29T12:21:45Zhttps://dotnetomaniak.pl/Local-optimizations-dont-add-up-IndexOutOfRange2600One of the main processes in cookit is dealing with extracting recipe information from raw html. I know it isn’t the most elegant solution but it is the only universal one.
But to the point.
Every web page goes through a process involving html parsing, stemming, parsing, and n-gram token matching. Then it’s saved to Sql Server and after transformation to Solr. So a lot of string manipulation, math calculations and from time to time mostly 0-gen GC.
In the most pessimistic case this process has to be r...http://indexoutofrange.com/LocalOptimizationsDontAddUp/http://dotnetomaniak.pl/Data/Thumbnails/small_JmTnSSi8I0mQqx44I9EEPQ.png