예제 #1
0
        public MailSender(
            IConfiguration configuration,
            TenantManager tenantManager,
            SettingsManager settingsManager,
            DistributedTaskQueueOptionsManager progressQueueOptionsManager,
            SendBatchEmailsOperation sendBatchEmailsOperation,
            CoreConfiguration coreConfiguration,
            IOptionsMonitor <ILog> logger
            )
        {
            _sendBatchEmailsOperation = sendBatchEmailsOperation;
            _tenantID          = tenantManager.GetCurrentTenant().TenantId;
            _mailQueue         = progressQueueOptionsManager.Get <SendBatchEmailsOperation>();
            _coreConfiguration = coreConfiguration;
            _logManager        = logger;

            int parsed;

            if (int.TryParse(configuration["crm:mailsender:quotas"], out parsed))
            {
                quotas = parsed;
            }

            _tenantManager   = tenantManager;
            _settingsManager = settingsManager;

            //            LogManager = logger.Get();
        }
예제 #2
0
 public QueueWorkerRemove(
     IHttpContextAccessor httpContextAccessor,
     IServiceProvider serviceProvider,
     DistributedTaskQueueOptionsManager options) :
     base(httpContextAccessor, serviceProvider, options)
 {
 }
예제 #3
0
 public ImportFromCSV(TenantManager tenantProvider,
                      DistributedTaskQueueOptionsManager progressQueueOptionsManager,
                      ImportDataOperation importDataOperation)
 {
     _tenantId            = tenantProvider.GetCurrentTenant().TenantId;
     _importQueue         = progressQueueOptionsManager.Get <ImportDataOperation>();
     _importDataOperation = importDataOperation;
 }
예제 #4
0
 public FileMarkerHelper(
     IServiceProvider serviceProvider,
     IOptionsMonitor <ILog> optionsMonitor,
     DistributedTaskQueueOptionsManager distributedTaskQueueOptionsManager)
 {
     ServiceProvider = serviceProvider;
     Log             = optionsMonitor.CurrentValue;
     Tasks           = distributedTaskQueueOptionsManager.Get <AsyncTaskData <T> >();
 }
예제 #5
0
 public PdfQueueWorker(DistributedTaskQueueOptionsManager queueOptions,
                       PdfProgressItem pdfProgressItem,
                       TenantManager tenantProvider,
                       SecurityContext securityContext)
 {
     _queue           = queueOptions.Get <PdfProgressItem>();
     _pdfProgressItem = pdfProgressItem;
     _tenantId        = tenantProvider.GetCurrentTenant().TenantId;
     _userId          = securityContext.CurrentAccount.ID;
 }
예제 #6
0
 public BackupWorker(
     IOptionsMonitor <ILog> options,
     ICacheNotify <BackupProgress> cacheBackupProgress,
     DistributedTaskQueueOptionsManager progressQueue,
     FactoryProgressItem factoryProgressItem,
     TempPath tempPath)
 {
     Log                 = options.CurrentValue;
     ProgressQueue       = progressQueue.Get <BaseBackupProgressItem>();
     CacheBackupProgress = cacheBackupProgress;
     FactoryProgressItem = factoryProgressItem;
     TempPath            = tempPath;
 }
예제 #7
0
 public StaticUploader(
     IServiceProvider serviceProvider,
     TenantManager tenantManager,
     SettingsManager settingsManager,
     StorageSettingsHelper storageSettingsHelper,
     ICache cache,
     DistributedTaskQueueOptionsManager options)
 {
     Cache                 = cache;
     ServiceProvider       = serviceProvider;
     TenantManager         = tenantManager;
     SettingsManager       = settingsManager;
     StorageSettingsHelper = storageSettingsHelper;
     Queue                 = options.Get <UploadOperationProgress>();
 }
예제 #8
0
 public VoipEngine(DaoFactory daoFactory,
                   CrmSecurity crmSecurity,
                   TenantUtil tenantUtil,
                   DistributedTaskQueueOptionsManager optionsManager,
                   SecurityContext securityContext,
                   IOptionsMonitor <ILog> logger,
                   TenantManager tenantManager,
                   VoipDao voipDao)
 {
     _crmSecurity     = crmSecurity;
     _tenantUtil      = tenantUtil;
     _securityContext = securityContext;
     _queue           = optionsManager.Get <QueueItem>();
     _logger          = logger.Get("ASC.CRM");
     _tenantManager   = tenantManager;
     _voipDao         = voipDao;
     _daoFactory      = daoFactory;
 }
예제 #9
0
        public ContactPhotoManager(Global global,
                                   WebImageSupplier webImageSupplier,
                                   IOptionsMonitor <ILog> logger,
                                   ICache cache,
                                   ICacheNotify <ContactPhotoManagerCacheItem> cacheNotify,
                                   DistributedTaskQueueOptionsManager optionsQueue)
        {
            _global           = global;
            _webImageSupplier = webImageSupplier;
            _cacheNotify      = cacheNotify;
            _cache            = cache;
            _resizeQueue      = optionsQueue.Get <ResizeWorkerItem>();
            _logger           = logger.Get("ASC.CRM");

            _cacheNotify.Subscribe((x) =>
            {
                _cache.Remove($"contact_photo_cache_key_id_{x.Id}");
            }, CacheNotifyAction.Remove);
        }
예제 #10
0
        private readonly DistributedTaskQueue ResizeQueue;//TODO: configure

        public UserPhotoManager(
            UserManager userManager,
            WebImageSupplier webImageSupplier,
            TenantManager tenantManager,
            StorageFactory storageFactory,
            UserPhotoManagerCache userPhotoManagerCache,
            IOptionsMonitor <ILog> options,
            DistributedTaskQueueOptionsManager optionsQueue,
            SettingsManager settingsManager,
            IServiceProvider serviceProvider)
        {
            ResizeQueue           = optionsQueue.Get <ResizeWorkerItem>();
            UserManager           = userManager;
            WebImageSupplier      = webImageSupplier;
            TenantManager         = tenantManager;
            StorageFactory        = storageFactory;
            UserPhotoManagerCache = userPhotoManagerCache;
            SettingsManager       = settingsManager;
            ServiceProvider       = serviceProvider;
            Log = options.Get("ASC.Web.Photo");
        }
예제 #11
0
 public StorageUploader(IServiceProvider serviceProvider, TempStream tempStream, ICacheNotify <MigrationProgress> cacheMigrationNotify, DistributedTaskQueueOptionsManager options)
 {
     ServiceProvider      = serviceProvider;
     TempStream           = tempStream;
     CacheMigrationNotify = cacheMigrationNotify;
     Queue = options.Get(nameof(StorageUploader));
 }
 public DocbuilderReportsUtility(DistributedTaskQueueOptionsManager distributedTaskQueueOptionsManager)
 {
     tasks  = distributedTaskQueueOptionsManager.Get("DocbuilderReportsUtility");
     Locker = new object();
 }
예제 #13
0
 public FileOperationsManager(TempStream tempStream, DistributedTaskQueueOptionsManager distributedTaskQueueOptionsManager, IServiceProvider serviceProvider)
 {
     tasks           = distributedTaskQueueOptionsManager.Get <FileOperation>();
     TempStream      = tempStream;
     ServiceProvider = serviceProvider;
 }
예제 #14
0
 public EncryptionWorker(FactoryOperation factoryOperation, DistributedTaskQueueOptionsManager options)
 {
     Locker           = new object();
     FactoryOperation = factoryOperation;
     Queue            = options.Get <EncryptionOperation>();
 }