Skip to content
/ Navvy Public
forked from manisero/Navvy

A .NET long-running tasks execution framework.

License

Notifications You must be signed in to change notification settings

lulzzz/Navvy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Navvy

A .NET long-running tasks execution framework.

How to use

  1. Install Manisero.Navvy NuGet package.
  1. Define task to execute:
var input = Enumerable.Repeat(1, 10);
var sum = 0;

var summingTask = new TaskDefinition(
    new BasicTaskStep(
        name: "Initialize",
        body: () => Console.WriteLine("Summing task started.")),
    new PipelineTaskStep<int>(
        name: "Sum",
        input: input,
        expectedItemsCount: 10,
        blocks: new List<PipelineBlock<int>>
        {
            new PipelineBlock<int>(
                name: "Sum",
                body: x => sum += x),
            new PipelineBlock<int>(
                name: "Log",
                body: x => Console.WriteLine($"Added {x}."))
        }),
    new BasicTaskStep(
        name: "Complete",
        body: () => Console.WriteLine("Summing task finished.")));
  1. Create task execution engine:
var executor = new TaskExecutorBuilder()
    .RegisterDataflowExecution() // Only if Manisero.Navvy.Dataflow package referenced
    .Build();
  1. Execute the task:
executor.Execute(summingTask);

Console.WriteLine($"Result: {sum}.");

For a more detailed sample, see sample application demonstrating usage of Navvy.

Features

  • Built-in progress reporting.
  • Cancellation support.
  • Detailed execution reporting:
    • Task-, Step- and Block- -Started / -Ended events,
    • -Ended events contain duration of the task / step / block.
  • Parallel processing support (Dataflow only).
  • Task execution errors handling.
  • Conditional steps execution.
  • Extensibility - new types of steps and new ways to execute them can be defined and registered.
  • Built on .NET Standard 2.0.

Feedback wanted

You are encouraged to play around with Navvy. If you do so, please give feedback! Write an email (you'll find the address here) or create an issue.

About

A .NET long-running tasks execution framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%