/// <summary>
        /// Initializes a new instance of the <see cref="MoveDelayedRecordsCommandHandler" /> class.
        /// </summary>
        /// <param name="moveDelayedToPendingLua">The move delayed to pending lua.</param>
        /// <param name="unixTimeFactory">The unix time factory.</param>
        /// <param name="options">The options.</param>
        public MoveDelayedRecordsCommandHandler(
            MoveDelayedToPendingLua moveDelayedToPendingLua,
            IUnixTimeFactory unixTimeFactory,
            RedisQueueTransportOptions options)
        {
            Guard.NotNull(() => moveDelayedToPendingLua, moveDelayedToPendingLua);
            Guard.NotNull(() => unixTimeFactory, unixTimeFactory);
            Guard.NotNull(() => options, options);

            _moveDelayedToPendingLua = moveDelayedToPendingLua;
            _unixTimeFactory         = unixTimeFactory;
            _options = options;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MoveDelayedRecordsCommandHandler" /> class.
        /// </summary>
        /// <param name="moveDelayedToPendingLua">The move delayed to pending lua.</param>
        /// <param name="unixTimeFactory">The unix time factory.</param>
        /// <param name="options">The options.</param>
        /// <param name="queueContext">The queue context.</param>
        public MoveDelayedRecordsCommandHandler(
            MoveDelayedToPendingLua moveDelayedToPendingLua,
            IUnixTimeFactory unixTimeFactory,
            RedisQueueTransportOptions options,
            QueueContext queueContext)
        {
            Guard.NotNull(() => moveDelayedToPendingLua, moveDelayedToPendingLua);
            Guard.NotNull(() => unixTimeFactory, unixTimeFactory);
            Guard.NotNull(() => options, options);
            Guard.NotNull(() => queueContext, queueContext);

            _moveDelayedToPendingLua = moveDelayedToPendingLua;
            _unixTimeFactory         = unixTimeFactory;
            _options  = options;
            _rpcQueue = queueContext.Context == QueueContexts.RpcQueue;
        }