Skip to content

A distributed scheduled real-time task processing server for .NET built on Schyntax, cs-schtick.redis and Redis for locking.

License

Notifications You must be signed in to change notification settings

PanteonProject/Panteon.Sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Panteon.Sdk

Panteon.Sdk

IMPORTANT

It uses Schyntax for defining event schedules.

Schyntax is a domain-specific language for defining event schedules in a terse, but readable, format. For example, if you want something to run every five minutes, you could write min(*%5).

Preview

Realtime Task

 public class HelloTask: RealtimePanteonWorker {
 	
 	public HelloTask(ILogger logger, 
 	       IHelloTaskSettings taskSettings, 
 	       IPubSubClient pubSubClient)
 	    : base(logger, taskSettings, pubSubClient) {
           }

 	public override string Name = > "My-Hello-Task";

 	public override bool Init(bool autoRun) {
 		return Run((task, offset) = > DoSomething());
 	}

 	private void DoSomething() {
 		string message = $ "{Name} Hello {DateTime.Now}";

 		for (int i = 0; i < 1000000; i++) {
 			var tmp = i / 100000;

 			if (i % 100000 == 0) {
 				Progress(new ProgressMessage {
 					Message = message, 
 					Percent = 10m * tmp
 				});
 			}
 		}

 		Console.WriteLine(message);
 	}
 }

General Task

  public class SampleTask: PanteonWorker {
  	public SampleTask(ILogger logger, 
  		ISampleTaskSettings taskSettings)
  	: base(logger, taskSettings) {
  	}
  	public override string Name = > "Sample-Task";

  	public override bool Init(bool autoRun) {
  		return Run((task, offset) = >
  		  Console.WriteLine($ "Dummy Hello {DateTime.Now}"));
  	}
  }

License

Code and documentation are available according to the MIT License (see LICENSE).

About

A distributed scheduled real-time task processing server for .NET built on Schyntax, cs-schtick.redis and Redis for locking.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%