GithubHelp home page GithubHelp logo

orchestrator's Introduction

orchestrator

A skeleton of a simple-minded task orchestration service

To launch, cd into the orchestrator directory and run

python3 orchestrator.py ../tests/test_config.yaml

This will launch the service based on the tasks defined in the test_config.yaml file. Upon startup, this config file will be read and tasks will be instantiated according to the task types and parameters specified therein. From then, an infinite loop will be started. Upon every step of this loop, the set of instantiated tasks will be examined and any that meet criteria to be run will have their run() method called. To exit, use ^C.

A sample task configuration snippet follows:

- class: fetch_latest_file.FetchLatestFile
  params:
    identifier: tmp_watcher
    recurring: True
    schedule: 
      on_second: 5
    dependencies: null
    path: /tmp

The class attribute specifies the python class that stores the generic logic to be used for this task. The params dictionary specifies the parameters to be used to control the behavior of this specific task instance. The first 4 are common across all task instances. The last parameter is specific to the FetchLatestFile task.

An example of how this might be utilized: Suppose you want to watch several different directories for incoming files. One task could be instantiated for each directory you need to watch, with a different path specified for each. Downstream processing of those arriving files could be effected by defining tasks that point back to the identifier of the appropriate upstream tasks in their dependencies lists.

orchestrator's People

Contributors

jgoleary avatar

Watchers

 avatar

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.