{"id":28462289,"url":"https://github.com/archit-p/karmchari","last_synced_at":"2025-07-03T16:31:19.391Z","repository":{"id":57537024,"uuid":"283550955","full_name":"archit-p/karmchari","owner":"archit-p","description":"A REST based job manager written in Go.","archived":false,"fork":false,"pushed_at":"2020-08-11T06:10:06.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-07T04:09:00.733Z","etag":null,"topics":["job-manager","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","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/archit-p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-29T16:38:23.000Z","updated_at":"2020-08-01T12:20:11.000Z","dependencies_parsed_at":"2022-08-29T00:31:02.560Z","dependency_job_id":null,"html_url":"https://github.com/archit-p/karmchari","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/archit-p/karmchari","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archit-p%2Fkarmchari","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archit-p%2Fkarmchari/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archit-p%2Fkarmchari/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archit-p%2Fkarmchari/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archit-p","download_url":"https://codeload.github.com/archit-p/karmchari/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archit-p%2Fkarmchari/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263360758,"owners_count":23454780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["job-manager","rest-api"],"created_at":"2025-06-07T04:09:00.823Z","updated_at":"2025-07-03T16:31:19.379Z","avatar_url":"https://github.com/archit-p.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Karmchari : REST Job Manager\n[![Golang](https://www.vectorlogo.zone/logos/golang/golang-ar21.svg)](https://golang.org)\n[![Redis](https://www.vectorlogo.zone/logos/redis/redis-ar21.svg)](https://redis.io)\n[![Build Status](https://img.shields.io/travis/archit-p/karmchari?style=flat-square)](https://travis-ci.org/archit-p/karmchari)\n[![License](https://img.shields.io/github/license/archit-p/karmchari?style=flat-square)](LICENSE.md)  \nKarmchari is a general purpose job manager written in Go. It allows for adding a job and updating and reading job states through a REST API.\n\n## Usecases\nHaving Karmchari maintain a global state of running processes can help give better control on the jobs running on various sytems and workers.\n1. Asynchronously signal workers to pause or kill jobs.\n2. Keep track of long running jobs.\n\n## Running\nKarmchari uses Redis for data storage. A quick way to run Redis is using its Docker image.\n```bash\ndocker run -p 6379:6379 --name redis-karmchari -d redis\n```\nPerhaps the simplest way to run Karmchari is through the included `Dockerfile`, and linking to the redis container.\n```bash\ndocker build -t karmchari .\ndocker run -p 51463:51463 --name karmchari-prod --link redis-karmchari:redis -d karmchari\n```\non Linux based PCs, simply run\n```bash\n./docker-build.sh\n```\n## Options\n```\nport  : port to start the app on ex. 51463\nshost : host for the redis instance ex. localhost:6379\n```\n\n## Endpoints\nCurrently two endpoints are supported - `registerJob` and `jobState`.\n### 1. registerJob (Method : POST)\n#### Description\nAdd a new job.\n#### Parameters\n```\ntype : type of job - can be upload, export or teams\n```\n#### Returns\n```\nOn success the job ID - MD5 hash string.\nOn failure appropriate error codes.\n```\n### 2. jobState (Method : POST)\n#### Description\nChange the state of a job.\n#### Parameters\n```\nid : job id\ncommand : what to do with the job - can be start, pause or kill\n```\n#### Returns\n```\nOn success the job ID and new state.\nOn failure appropriate error codes.\n```\n### 3. jobState (Method: GET)\n#### Descrtiption\nRead the state of a job\n#### Parameters\n```\nid : job id\n```\n#### Returns\n```\nOn success returns the job state (start, pause or kill)\nOn failure appropriate error codes.\n```\n## Examples\nKarmchari's APIs can be accessed through an HTTP client such as `curl` or `wget`.\n#### Creating a job\n```bash\ncurl -d \"type=teams\" http://localhost:51463/registerJob\nOutput: Created! id = 45c02fc01519814156e94adbd1902279\n```\n#### Put a job into hibernation\n```bash\ncurl -d \"id=45c02fc01519814156e94adbd1902279\u0026command=pause\" http://localhost:51463/jobState\nOutput: 45c02fc01519814156e94adbd1902279 -- pause\n```\n#### Read a jobs state\n```bash\ncurl http://localhost:51463/jobState?id=45c02fc01519814156e94adbd1902279\nOutput: 45c02fc01519814156e94adbd1902279 -- pause\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchit-p%2Fkarmchari","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchit-p%2Fkarmchari","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchit-p%2Fkarmchari/lists"}