Skip to content

xllily/code-exec-cmd

Repository files navigation

Overview

The Command Service is responsible for receiving Python code submissions from the frontend, storing job information, and enqueuing job IDs for processing by the Worker Service. This service provides RESTful APIs for code submission and result retrieval.

Features

  • Accepts Python code submissions via a RESTful API.
  • Stores submitted code and job metadata.
  • Enqueues job IDs for asynchronous processing.
  • Provides API to check the execution status and results.

API Endpoints

  • Submit Code

    • Endpoint: POST /submit-code
    • Description: Accepts Python code and returns a job ID.
    • Request Body:
      {
        "code": "print('Hello, World!')"
      }
    • Response:
      {
        "jobId": "1234567890abcdef"
      }
  • Get Execution Result

    • Endpoint: GET /exec-result?jobId={jobId}
    • Description: Retrieves the execution status and result of the submitted job.
    • Response:
      {
        "status": "completed",
        "result": "Hello, World!"
      }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published