Skip to content

realnighthawk/workflow-executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workflow Executor

A Python microservice that implements a workflow execution engine with HTTP and gRPC interfaces.

Features

  • HTTP server for health checks and metrics
  • gRPC server implementing the ExecutorService defined in proto/executor.proto
  • Prometheus metrics integration
  • Concurrent workflow execution

Requirements

  • Python 3.8+
  • Make (for using the Makefile)

Setup

  1. Create a virtual environment and install dependencies:
make setup
  1. Install the package in development mode:
source venv/bin/activate
make install

Running the Service

Start the service with:

make run

This will start:

  • HTTP server on port 8000 (configurable via HTTP_PORT env var)
  • gRPC server on port 50051 (configurable via GRPC_PORT env var)
  • Prometheus metrics server on port 9090 (configurable via PROMETHEUS_PORT env var)

API Endpoints

HTTP

  • GET /health - Health check endpoint
  • GET /metrics - Custom metrics endpoint

gRPC

The service implements the following gRPC methods:

  • ExecuteWorkflow - Execute a workflow with streaming response
  • GetWorkflowStatus - Get status of a workflow
  • CancelWorkflow - Cancel a workflow

Development

Regenerating Proto Files

If you modify the proto file, regenerate the Python code with:

make proto

Running Tests

make test

Linting

make lint

Cleaning Up

make clean

Environment Variables

  • GRPC_PORT - Port for the gRPC server (default: 50051)
  • HTTP_PORT - Port for the HTTP server (default: 8000)
  • PROMETHEUS_PORT - Port for the Prometheus metrics server (default: 9090)

License

Copyright (c) 2025 Windsurf

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published