Ignore:
Timestamp:
02/14/21 23:34:17 (4 years ago)
Author:
Dimitar Slezenkovski <dslezenkovski@…>
Branches:
master
Parents:
f554983
Message:

Fix cron job bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • FarmatikoServices/Services/SingletonUpdateDataJobFactory.cs

    rf554983 r472dd7e  
    1818        public IJob NewJob(TriggerFiredBundle bundle, IScheduler scheduler)
    1919        {
    20             return _serviceProvider.GetRequiredService(bundle.JobDetail.JobType) as IJob;
     20            using (var scope = _serviceProvider.CreateScope())
     21            {
     22                return scope.ServiceProvider.GetRequiredService(bundle.JobDetail.JobType) as IJob;
     23            }
     24           
    2125        }
    2226
Note: See TracChangeset for help on using the changeset viewer.