Skip to content

A simple flow engine that lets running arbitrary python

Notifications You must be signed in to change notification settings

graboskyc/Executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Executor

About this tool

This is a system that will allow chaning together multiple scripts in to executions. It can be enqueued by a UI or an API call, making it work well with FaaSSubMgr

Running

  • Edit the portal/.env (there is a sample.env) to put in the URI for a MongoDB cluster
  • Run the build.sh script within portal folder
  • The portal is now running
  • Edit the agent/.env (there is a sample.env) to put in the FQDN of the IP and port the portal server is running on
  • Run the build.sh script within the agent folder
  • Everything is now running so you can use the portal to administer tasks

For advanced usage

  • See the FAQ page within the running portal

Terminology

  • Template - The reusable building block Tasks comprised of a name, a specified engine, an icon, and an uploaded zip file. It may optionally have additional input parameters that can be specified as user input when put into a Workflow
  • Task - When a Template is put into a Workflow, it becomes an instantiation of a Template, and thus a Task. It inherits all of the details of the Template, but then when placed into a Workflow it can have its argument values configured
  • Workflow - A saved collection of Tasks in an order
  • Execution - A specific instantiation of a Workflow where the entire Workflow is run top to bottom

Screenshots

Homepage

Managing Task Templates

Managing Workflows (a series of implementations of Tasks)

Editing a Workflow

Modifying context of a Task

Viewing a Workflow's and Task's Execution

Context

Yes, an env variable called EXECUTOR is included. You should json.loads(os.environ["EXECUTOR"]) to gain access to the format below which is the entire context for the execution:

{ "_id":{"$oid":"6723ae8ee9ebad747255ff55"}, "payload":{ // any additional data you pass in when calling the enqueue API }, "workflowId":"6723a5349df2474dd9315a8a", "status":"queued", "created":{"$date":"2024-10-31T16:21:34.541Z"}, "modified":{"$date":"2024-10-31T16:21:34.541Z"}, "workflow":{"_id":{"$oid":"6723a5349df2474dd9315a8a"}, "name":"Buncha Hellos", "wf":[ { "_id":{"$oid":"6723a5319df2474dd9315a89"}, "title":"Hello World With Time and Env", "engine":"python3", "arguments":[{"key":"key","friendlyName":"value"}], "icon":"code", "gridfspointer":{"$oid":"6723ad020bf8e5e2f1f3dfab"} } ] }

Additionally, EXECUTORTASK has just the details for this step:

{ "_id":{"$oid":"6723a5319df2474dd9315a89"}, "title":"Hello World With Time and Env", "engine":"python3", "arguments":[{"key":"key","friendlyName":"value"}], "icon":"code", "gridfspointer":{"$oid":"6723ad020bf8e5e2f1f3dfab"} }

Lastly, EXECUTORLASTOUTPUT has the output of the previous command in case you are chaning them:

{ "response": "big string of whatever was spit out of last command", "status": "complete" }

If all else fails, EXECUTORPORTAL has the IP address or hostname of the Portal. So you can make API calls directly.

About

A simple flow engine that lets running arbitrary python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published