Azure WebJob launches old code

We have a bug in our WebJob running in our live environment, I detected a bug and fixed it, I can check it in our Dev environment. I published my WebJob as "Azure WebJob" for our live environment, but the error that I am still present. To add to the confusion, now an error sometimes occurs. Therefore, for some reason, the old code is working somewhere.

Can someone please help me figure this out?

+5
source share
2 answers

I had a similar problem. We are deploying using a scripting environment in Azure, and it turned out that the "old" WebJobs (running code with the old version of the entity model), which is still running in the queue. These are jobs where they then retrieve messages and consume them. To add to the problem, an exception was used in an attempt to catch, and WebJob status was successful.

Check if you have a scene environment (add -stage for the name Webapp), and if so, log in to the Azure Management Portal and stop them.

Note that stopping Webapp is not enough; you must stop WebJobs immediately. This is done (on the new portal) under "Settings-> Web Applications", and then right-click on the name of the website, selecting "Stop".

How to Stop WebJob

+4
source

I spent time studying this problem. Turns out I had a web project working on a console on my computer! No matter what I did on Azure, having this exe application and using the same repository for web jobs meant that the old code running on my work computer lifted the jobs before Azure. Easy fix: just make sure exes is not working outside of Azure!

+1
source

Source: https://habr.com/ru/post/1232030/


All Articles