Example #1
0
        static Task DeferTask(TaskDefinition taskDefinition, IBusContext bus)
        {
            var options = new SendOptions();

            options.DelayDeliveryWith(taskDefinition.Every);
            options.RouteToLocalEndpointInstance();

            return(bus.Send(new ScheduledTask
            {
                TaskId = taskDefinition.Id,
                Name = taskDefinition.Name,
                Every = taskDefinition.Every
            }, options));
        }