{"id":28384470,"url":"https://github.com/runpod-workers/mock-worker","last_synced_at":"2026-02-05T18:32:06.459Z","repository":{"id":183513422,"uuid":"670284203","full_name":"runpod-workers/mock-worker","owner":"runpod-workers","description":"🦜 | Emulate RunPod worker functionality. ","archived":false,"fork":false,"pushed_at":"2025-06-23T20:34:34.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-23T21:35:14.060Z","etag":null,"topics":["runpod","serverless"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runpod-workers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-24T17:44:12.000Z","updated_at":"2025-06-23T20:34:30.000Z","dependencies_parsed_at":"2023-07-24T19:03:47.528Z","dependency_job_id":"9f296d1d-4645-4e42-9c22-84c891af6d5f","html_url":"https://github.com/runpod-workers/mock-worker","commit_stats":null,"previous_names":["runpod-workers/mock-worker"],"tags_count":10,"template":false,"template_full_name":"runpod-workers/worker-template","purl":"pkg:github/runpod-workers/mock-worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fmock-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fmock-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fmock-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fmock-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runpod-workers","download_url":"https://codeload.github.com/runpod-workers/mock-worker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runpod-workers%2Fmock-worker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29128707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T18:31:02.507Z","status":"ssl_error","status_checked_at":"2026-02-05T18:29:43.962Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["runpod","serverless"],"created_at":"2025-05-30T08:38:46.781Z","updated_at":"2026-02-05T18:32:06.435Z","avatar_url":"https://github.com/runpod-workers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ch1\u003eMock | Worker\u003c/h1\u003e\n\n[![CI | Test Worker](https://github.com/runpod-workers/mock-worker/actions/workflows/CI-test_worker.yml/badge.svg)](https://github.com/runpod-workers/mock-worker/actions/workflows/CI-test_worker.yml)\n\u0026nbsp;\n[![CD | Dev Docker Image](https://github.com/runpod-workers/mock-worker/actions/workflows/CD-docker_dev.yml/badge.svg)](https://github.com/runpod-workers/mock-worker/actions/workflows/CD-docker_dev.yml)\n\n🦜 | A mock worker that can be used to emulate the behavior of different types of endpoints. [Docker Link](https://hub.docker.com/r/runpod/mock-worker)\n\u003c/div\u003e\n\n## Usage\n\n```json\n{\"input\":\n    {\n        \"mock_return\": \"Anything here will be returned as the output of the worker.\",\n        \"mock_delay\": 0, // The number of seconds to wait before returning output, raising error or crashing. If generator is enabled, this is the delay between each yeild.\n        \"mock_progress\": {\n            \"updates\": [],  // A list of progress updates to send back to the RunPod API.\n            \"wait_time\": 0 // The number of seconds to wait before sending a progress update.\n        },\n        \"mock_error\": false, // If true, the worker will raise an error.\n        \"mock_crash\": false, // If true, the worker will crash (kills the processes)\n        \"mock_refresh\": false, // If true, the refresh_worker flag is enabled.\n\n        \"mock_external\": {\n            \"error_job_return\": false, // If true, the job will fail to return the job results.\n        },\n        \"mock_logs\": [  // A list of log messages to generate, these are sent at the start of the job.\n            {\n                \"level\": \"info\", // The log level to use. Options: debug, info, warn, error\n                \"message\": \"This is a log message.\" // The log message to send.\n            }\n        ]\n    }\n}\n```\n\n### Generator or Async Handler\n\nTo test the generator handler override the docker command with the following:\n\n```bash\npython3 -u /handler.py --generator\n```\n\n```bash\npython3 -u /handler.py --async_generator\n```\n\nTo return the stream aggregation include `--return_aggregate_stream` argument.\n\n```json\n# To test multiple yeild outputs, set the `mock_return` to a list of values.\n{\n    \"input\": {\n        \"mock_return\": [\"value1\", \"value2\", \"value3\"],\n        \"mock_delay\": 0,\n        \"mock_error\": false,\n        \"mock_crash\": false\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunpod-workers%2Fmock-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunpod-workers%2Fmock-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunpod-workers%2Fmock-worker/lists"}