{"id":13582386,"url":"https://github.com/olivere/jobqueue","last_synced_at":"2025-09-03T13:32:08.553Z","repository":{"id":56474305,"uuid":"57304669","full_name":"olivere/jobqueue","owner":"olivere","description":"Jobqueue manages running and scheduling jobs (think Sidekiq or Resque for Go).","archived":false,"fork":false,"pushed_at":"2021-05-19T16:46:53.000Z","size":3823,"stargazers_count":39,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-13T16:50:23.641Z","etag":null,"topics":["go","jobqueue","resque","scheduled-jobs","sidekiq","workers"],"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/olivere.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}},"created_at":"2016-04-28T13:38:13.000Z","updated_at":"2024-10-09T11:50:05.000Z","dependencies_parsed_at":"2022-08-15T19:30:37.977Z","dependency_job_id":null,"html_url":"https://github.com/olivere/jobqueue","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivere%2Fjobqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivere%2Fjobqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivere%2Fjobqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivere%2Fjobqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olivere","download_url":"https://codeload.github.com/olivere/jobqueue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231888962,"owners_count":18441360,"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":["go","jobqueue","resque","scheduled-jobs","sidekiq","workers"],"created_at":"2024-08-01T15:02:39.973Z","updated_at":"2024-12-30T16:57:52.876Z","avatar_url":"https://github.com/olivere.png","language":"Go","readme":"# Jobqueue\n\nJobqueue manages running and scheduling jobs (think Sidekiq or Resque).\n\n[![Test](https://github.com/olivere/jobqueue/actions/workflows/test.yaml/badge.svg)](https://github.com/olivere/jobqueue/actions/workflows/test.yaml)\n[![Docs](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://pkg.go.dev/github.com/olivere/jobqueue)\n[![License](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/olivere/jobqueue/master/LICENSE)\n\n## Prerequisites\n\nYou can choose between\n[MySQL](https://travis-ci.org/olivere/jobqueue/master/mysql)\nand\n[MongoDB](https://travis-ci.org/olivere/jobqueue/master/mongodb)\nas a backend for persistent storage.\n\n## Getting started\n\nGet the repository with `go get github.com/olivere/jobqueue`.\n\nExample:\n\n```go\nimport (\n\t\"github.com/olivere/jobqueue\"\n\t\"github.com/olivere/jobqueue/mysql\"\n)\n\n// Create a MySQL-based persistent backend.\nstore, err := mysql.NewStore(\"root@tcp(127.0.0.1:3306)/jobqueue_e2e?loc=UTC\u0026parseTime=true\")\nif err != nil {\n\tpanic(err)\n}\n\n// Create a manager with the MySQL store and 10 concurrent workers.\nm := jobqueue.New(\n\tjobqueue.SetStore(store),\n\tjobqueue.SetConcurrency(10),\n)\n\n// Register one or more topics and their processor\nm.Register(\"clicks\", func(args ...interface{}) error {\n\t// Handle \"clicks\" topic\n})\n\n// Start the manager\nerr := m.Start()\nif err != nil {\n\tpanic(err)\n}\n\n// Add a job: It'll be added to the store and processed eventually.\nerr = m.Add(\u0026jobqueue.Add{Topic: \"clicks\", Args: []interface{}{640, 480}})\nif err != nil {\n\tpanic(err)\n}\n\n...\n\n// Stop the manager, either via Stop/Close (which stops after all workers\n// are finished) or CloseWithTimeout (which gracefully waits for a specified\n// time span)\nerr = m.CloseWithTimeout(15 * time.Second) // wait for 15 seconds before forced stop\nif err != nil {\n\tpanic(err)\n}\n```\n\nSee the tests for more details on using jobqueue.\n\n## Tests and Web UI\n\nEnsure the tests succeed with `go test`. You may have to install dependencies.\n\nYou can run a simulation of a real worker like so:\n\n```sh\ncd e2e\ngo run main.go\n```\n\nPlay with the options: `go run e2e/main.go -h`.\n\nThen open a second console and watch the worker doing its job:\n\n```sh\ncd ui\ngo run main.go\n```\n\nThen open your web browser at [http://127.0.0.1:12345](http://127.0.0.1:12345).\n\n![Screenshot](https://raw.githubusercontent.com/olivere/jobqueue/master/doc/screenshot1.png)\n\n# License\n\nMIT License. See [LICENSE](https://olivere.mit-license.org/) file for details.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivere%2Fjobqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivere%2Fjobqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivere%2Fjobqueue/lists"}