简体   繁体   中英

Can you run a webjob on two separate app services concurrently (bypass singleton lock)?

I am setting up an Azure WebJob (Timer Triggered) on two separate app services. But because of the singleton lock, only one of them can actually preform their function, while the other one stops. Is there a way to let the "same" WebJob run on both concurrently? The applications are two environments of the same web page (demo and production), so it would be nice if I didnt have to create a new WebJob project for each app service, but rather reuse the one I have.

We do this via configuration. We have CI, test, staging and prod all from the same build. We have configs for each environment and use Octopus deploy to transform the config based on the environment and deploy the job to Azure in the appropriate environment.

For anyone else having this problem in the future: It seems that what was blocking the WebJobs from running concurrently was the fact that they were using the same storage account. Was a whoopsie on my part :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM