Code Monkey home page Code Monkey logo

panteon.sdk's Introduction

Panteon.Sdk

Panteon.Sdk

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}"));
  	}
  }

More coming soon (:

License

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

panteon.sdk's People

Contributors

bugthesystem avatar ucatal avatar

Stargazers

Oucema Zitoun avatar ShaykhullinSergey avatar Vijay Gill avatar  avatar Samet ViRDiL avatar Erdem OZDEMIR avatar Serkan Yoguran avatar  avatar  avatar Oğuzhan Demir avatar

Watchers

 avatar Ömer Cinbat avatar Oğuzhan Demir avatar  avatar  avatar

panteon.sdk's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.