{"id":22264254,"url":"https://github.com/nikhilbhatia08/taskflow","last_synced_at":"2026-02-14T18:31:03.547Z","repository":{"id":261080878,"uuid":"883207251","full_name":"nikhilbhatia08/taskflow","owner":"nikhilbhatia08","description":"A distributed, durable job execution platform","archived":false,"fork":false,"pushed_at":"2024-12-09T03:13:41.000Z","size":1071,"stargazers_count":1,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T18:55:40.889Z","etag":null,"topics":["background-jobs","distributed","go","grpc","task-queues","worker-pool","workflow-engine"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikhilbhatia08.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-04T15:03:02.000Z","updated_at":"2024-12-09T03:13:45.000Z","dependencies_parsed_at":"2024-11-04T16:21:12.413Z","dependency_job_id":"0e8f7963-e45f-40ff-8a87-37e8b97a63b1","html_url":"https://github.com/nikhilbhatia08/taskflow","commit_stats":null,"previous_names":["nikhilbhatia08/taskflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikhilbhatia08/taskflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilbhatia08%2Ftaskflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilbhatia08%2Ftaskflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilbhatia08%2Ftaskflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilbhatia08%2Ftaskflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikhilbhatia08","download_url":"https://codeload.github.com/nikhilbhatia08/taskflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhilbhatia08%2Ftaskflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29452371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["background-jobs","distributed","go","grpc","task-queues","worker-pool","workflow-engine"],"created_at":"2024-12-03T10:08:19.010Z","updated_at":"2026-02-14T18:31:03.526Z","avatar_url":"https://github.com/nikhilbhatia08.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TaskFlow: Task executor and scheduler in Go\n\n![TaskFlow Hero](assets/jobexecution.png)\n![TaskFlow Hero](assets/taskflow.png#gh-light-mode-only)\n![TaskFlow Hero](assets/taskflowdark.png#gh-dark-mode-only)\n\nTaskFlow is an efficient task executor and scheduler which is used to schedule jobs and tasks and multiple workers can pick those tasks and execute them\n\n## Usage\n\nImport the taskflow-gosdk:\n```sh\ngo get github.com/nikhilbhatia08/taskflow/taskflow-gosdk\n```\n\n```go\npackage tasks\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"log\"\n\t\"fmt\"\n\t\"time\"\n\n\ttaskflowgosdk \"github.com/nikhilbhatia08/taskflow/taskflow-gosdk\"\n)\n\ntype EmailPayload struct {\n\tEmailSenderId string\n\tEmailRecieverId string\n\tEmailBody string\n}\n\n// Write a function to create a task which consists of queuename, payload and the number of retries\nfunc EmailDelivery() error {\n\ttaskflow, err := taskflowgosdk.NewServer(\"localhost:9003\", \"localhost:9002\") // The configurations of the jobservice and the queueservice\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tpayload, err := json.Marshal(EmailPayload{EmailSenderId: \"SomeSenderId\", EmailRecieverId: \"SomeRecieverId\", EmailBody: \"Some body\"})\n\tif err != nil {\n\t\treturn err\n\t}\n\ttaskflow.NewJob(\u0026taskflowgosdk.CreateJobRequest{\n\t\tQueueName: \"EmailQueue\",\n\t\tPayload: string(payload),\n\t\tRetries: 5,\n\t})\n\treturn nil\n}\n```\n\nCreate a worker and start executing the jobs:\n```go\npackage tasks\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"log\"\n\t\"fmt\"\n\t\"time\"\n\n\ttaskflowgosdk \"github.com/nikhilbhatia08/taskflow/taskflow-gosdk\"\n)\n\ntype EmailPayload struct {\n\tEmailSenderId string\n\tEmailRecieverId string\n\tEmailBody string\n}\n\n// Write a function to create a worker to poll to the task queue and execute the jobs\nfunc EmailWorker() error {\n\tworker, err := taskflowgosdk.NewServer(\"localhost:9003\", \"localhost:9002\") // The configurations of the jobservice and the queueservice\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tworker.Run(\u0026taskflowgosdk.RunConfigurations{\n\t\tQueueName: \"EmailQueue\",\n\t\tHandler: EmailDeliveryHandler,\n\t})\n\treturn nil\n}\n\nfunc EmailDeliveryHandler(ctx context.Context, emailJob *taskflowgosdk.Job) error {\n\t// Write the job handler logic\n}\n```\n\n## System Components\n\n## Life of a schedule\n\n## Directory structure\n\nHere's a brief overview of the project's directory structure:\n\n- [`cmd/`](./cmd/): Contains the main entry points for the scheduler, coordinator, task queue and worker services.\n- [`pkg/`](./pkg/): Contains the core logic for the scheduler, coordinator, task queue and worker services.\n- [`data/`](./data/): Contains SQL scripts to initialize the db.\n- [`tests/`](./tests/): Contains integration tests.\n- [`*-dockerfile`](./docker-compose.yml): Dockerfiles for building the scheduler, coordinator, task queue and worker services.\n- [`docker-compose.yml`](./docker-compose.yml): Docker Compose configuration file for spinning up the entire cluster.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilbhatia08%2Ftaskflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikhilbhatia08%2Ftaskflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhilbhatia08%2Ftaskflow/lists"}