Esempio n. 1
0
 protected virtual async Task TryUpdateAsync(IBackgroundJobStore store, BackgroundJobInfo jobInfo)
 {
     try {
         await store.UpdateAsync(jobInfo);
     } catch (Exception updateEx) {
         Logger.LogException(updateEx);
     }
 }
Esempio n. 2
0
 public DefaultBackgroundJobManager(
     IClock clock,
     IBackgroundJobSerializer serializer,
     IBackgroundJobStore store,
     IGuidGenerator guidGenerator)
     : base(clock, serializer, store, guidGenerator)
 {
 }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="clock"></param>
 /// <param name="serializer"></param>
 /// <param name="store"></param>
 public DefaultBackgroundJobManager(
     IClock clock,
     IBackgroundJobSerializer serializer,
     IBackgroundJobStore store)
 {
     Clock      = clock;
     Serializer = serializer;
     Store      = store;
 }
 public DefaultBackgroundJobManager(
     IClock clock,
     IBackgroundJobSerializer serializer,
     IBackgroundJobStore store,
     IGuidGenerator guidGenerator)
 {
     Clock         = clock;
     Serializer    = serializer;
     GuidGenerator = guidGenerator;
     Store         = store;
 }
Esempio n. 5
0
 protected virtual void TryUpdate(IBackgroundJobStore store, BackgroundJobInfo jobInfo)
 {
     try
     {
         store.Update(jobInfo);
     }
     catch (Exception updateEx)
     {
         Logger.LogException(updateEx);
     }
 }
Esempio n. 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BackgroundJobManager"/> class.
        /// </summary>
        public BackgroundJobManager(
            IIocResolver iocResolver,
            IBackgroundJobStore store,
            AbpTimer timer)
            : base(timer)
        {
            _store       = store;
            _iocResolver = iocResolver;

            Timer.Period = JobPollPeriod;
        }
 public LongRunBackgroundJobManager(IIocResolver iocResolver,
                                    IBackgroundJobStore store, AbpTimer timer,
                                    IRepository <LongRunInfo, string> longRunInfoRepo,
                                    IKeyGenerator keyGenerator,
                                    ICancellationWorker cancellationWorker)
     : base(iocResolver, store, timer)
 {
     _longRunInfoRepo    = longRunInfoRepo;
     _keyGenerator       = keyGenerator;
     _cancellationWorker = cancellationWorker;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="BackgroundJobManager"/> class.
        /// </summary>
        public BackgroundJobManager(
            IIocResolver iocResolver,
            IBackgroundJobStore store,
            AbpTimer timer)
            : base(timer)
        {
            _store       = store;
            _iocResolver = iocResolver;
            EventBus     = Framework.EventBus.EventBus.Default;

            Timer.Period = JobPollPeriod;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BackgroundJobManager"/> class.
        /// </summary>
        public BackgroundJobManager(
            IIocResolver iocResolver,
            IBackgroundJobStore store,
            AbpTimer timer)
            : base(timer)
        {
            _store       = store;
            _iocResolver = iocResolver;

            EventBus = NullEventBus.Instance;

            Timer.Period = JobPollPeriod;
        }
Esempio n. 10
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="BackgroundJobManager" /> class.
        /// </summary>
        public BackgroundJobManager(
            IIocResolver iocResolver,
            IBackgroundJobStore store,
            StudioXTimer timer)
            : base(timer)
        {
            this.store       = store;
            this.iocResolver = iocResolver;

            EventBus = NullEventBus.Instance;

            Timer.Period = JobPollPeriod;
        }
Esempio n. 11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BackgroundJobManager"/> class.
        /// </summary>
        public BackgroundJobManager(
            IServiceProvider serviceProvider,
            IBackgroundJobStore store,
            DomainTimer timer,
            IEventBus eventBus,
            ISerializer serializer,
            ILogger <BackgroundJobManager> logger)
            : base(timer, logger)
        {
            _store           = store;
            _eventBus        = eventBus;
            _serviceProvider = serviceProvider;
            _serializer      = serializer;
            _logger          = logger;

            Timer.Period = JobPollPeriod;
        }
Esempio n. 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultBackgroundJobManager"/> class.
 /// </summary>
 public BackgroundJobWorker(
     IBackgroundJobStore store,
     AbpTimer timer,
     IBackgroundJobExecuter jobExecuter,
     IBackgroundJobSerializer serializer,
     IOptions <BackgroundJobOptions> jobOptions,
     IOptions <BackgroundJobWorkerOptions> workerOptions,
     IClock clock)
     : base(timer)
 {
     JobExecuter   = jobExecuter;
     Serializer    = serializer;
     Clock         = clock;
     Store         = store;
     WorkerOptions = workerOptions.Value;
     JobOptions    = jobOptions.Value;
     Timer.Period  = WorkerOptions.JobPollPeriod;
 }
Esempio n. 13
0
 public BackgroundJobStore_Tests()
 {
     _backgroundJobStore = GetRequiredService <IBackgroundJobStore>();
 }
Esempio n. 14
0
 public BackgroundJobManager_Tests()
 {
     _backgroundJobManager = GetRequiredService <IBackgroundJobManager>();
     _backgroundJobStore   = GetRequiredService <IBackgroundJobStore>();
 }
Esempio n. 15
0
 public BackgroundJobManagerEventTriggerExtensions_Tests()
 {
     _backgroundJobManager = LocalIocManager.Resolve <IBackgroundJobManager>();
     _backgroundJobStore   = LocalIocManager.Resolve <IBackgroundJobStore>();
 }