Reputation:
I have a continuous WebJob that I would like to configure to only ever have a single instance.
This is achieved by putting the " { enableLogs: 1 } " setting in the app.settings file.
What I'm struggling with is the deployment of such a file.
That seems lame...
The same article does suggest using the WebJobs API, but again this isn't built in to the Publish process, so it'd be a manual step or some odd code that runs in the WebJob itself.
I feel I must be missing a way to get this working with the Publish process.
I've had a search around on Google looking for people who have done the same thing but I'm not finding much.
Upvotes: 16
Views: 7401
Reputation: 1
I added the settings.job into my respective bin folders for each web job + "Copy Always" setting - then did an Azure Publish from Visual Studio. Worked a charm.
Needed to restart my Azure App for this to pick up.
Upvotes: -1
Reputation: 43203
Please try the following:
settings.job
file at the root of your WebJobs console appAnd it should get deployed. Find full sample that does that here: https://github.com/davidebbo-test/WebAppWithWebJobsVS.
Upvotes: 18