Ejemplo n.º 1
0
        public static async Task EnqueueBatch <TItem>(this IDelayedJobQueue <TItem> delayedQueue,
                                                      IEnumerable <TItem> items, TimeSpan delay) where TItem : IJobStep
        {
            var steps = items.Select(item => new Tuple <TItem, TimeSpan>(item, delay)).ToList();

            await delayedQueue.EnqueueBatch(steps);
        }
Ejemplo n.º 2
0
 public static async Task Enqueue <TItem>(this IDelayedJobQueue <TItem> delayedQueue, TItem item,
                                          TimeSpan delay) where TItem : IJobStep
 {
     var step = new Tuple <TItem, TimeSpan>(item, delay);
     await delayedQueue.EnqueueBatch(step.Yield());
 }
Ejemplo n.º 3
0
 public static async Task Enqueue <TItem>(this IDelayedJobQueue <TItem> delayedQueue, TItem item,
                                          DateTime processTime) where TItem : IJobStep
 {
     var step = new Tuple <TItem, DateTime>(item, processTime);
     await delayedQueue.EnqueueBatch(step.Yield());
 }