コード例 #1
0
ファイル: FetchedJobsWatcher.cs プロジェクト: jerry4/Hangfire
        public FetchedJobsWatcher(
            JobStorage storage,
            FetchedJobsWatcherOptions options)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (options == null) throw new ArgumentNullException("options");

            _storage = storage;
            _options = options;
        }
コード例 #2
0
        public FetchedJobsWatcher(
            RedisStorage storage,
            TimeSpan invisibilityTimeout,
            FetchedJobsWatcherOptions options)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (options == null) throw new ArgumentNullException("options");
            if (invisibilityTimeout.Ticks <= 0)
            {
                throw new ArgumentOutOfRangeException("invisibilityTimeout", "Invisibility timeout duration should be positive.");
            }

            _storage = storage;
            _invisibilityTimeout = invisibilityTimeout;
            _options = options;
        }