I'm new to WebJobs and I need to add one to my existing MVC Web App (hosted in Azure) to process a long running task. The long running task is carrying out an ETL type process where it calls several external web services to retrieve data via SOAP/XML, saves this data to a SQL db and then transforms the data and the loads the saved data back in the database. This process can take 20-30 mins to run end to end.
I originally had the web app responsible for starting and processing the long running task but realised this doesn't work well and have since decided to move this process to a WebJob. Makes sense?
Most of the logic for the long running task exists inside a service layer and the Controller Action inside the web app was responsible for "starting" the task.
The web app is using Autofac for DI.
What's the best way to share/re-use the existing Autofac configuration from the web app without having to duplicate the code within the WebJob application? i.e. can/should the WebJob reference the MVC web app project?