{"id":21671095,"url":"https://github.com/iflamed/mfworker","last_synced_at":"2025-10-13T08:05:59.480Z","repository":{"id":68811932,"uuid":"224796707","full_name":"iflamed/mfworker","owner":"iflamed","description":"A memory and file based task worker for Golang.  Queue jobs only for single process application.","archived":false,"fork":false,"pushed_at":"2019-12-22T14:48:14.000Z","size":32,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T08:05:58.801Z","etag":null,"topics":["golang","queue","queue-workers","queued-jobs","task-queue","worker-queue"],"latest_commit_sha":null,"homepage":null,"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/iflamed.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}},"created_at":"2019-11-29T07:06:12.000Z","updated_at":"2022-10-06T04:59:14.000Z","dependencies_parsed_at":"2024-06-20T05:43:52.187Z","dependency_job_id":"2199b9e8-5bdb-45f2-b55a-9db6c188888e","html_url":"https://github.com/iflamed/mfworker","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/iflamed/mfworker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iflamed%2Fmfworker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iflamed%2Fmfworker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iflamed%2Fmfworker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iflamed%2Fmfworker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iflamed","download_url":"https://codeload.github.com/iflamed/mfworker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iflamed%2Fmfworker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014286,"owners_count":26085489,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","queue","queue-workers","queued-jobs","task-queue","worker-queue"],"created_at":"2024-11-25T12:37:57.812Z","updated_at":"2025-10-13T08:05:59.462Z","avatar_url":"https://github.com/iflamed.png","language":"Go","readme":"Golang mfworker\n----------\n\u003e Mfworker is a memory and file based task worker for Golang. \n\u003e It's embeddable for golang project. So it's only work for single process application.\n\n## Features\n1. Custom worker numbers.\n2. Custom the number of jobs stored in memory.\n3. Single process.\n4. Thread safe. \n5. Jobs will be store in memory first, then auto store jobs to badger db file.\n6. Recoverable, when process exit, it will auto save jobs to file.\n\n## Demo\n```go\npackage main\n\nimport (\n    \"log\"\n    \"strconv\"\n    \"time\"\n    \"github.com/iflamed/mfworker\"\n)\n\nfunc main()  {\n    var (\n        count    uint\n        maxItems uint\n    )\n    count = 4\n    maxItems = 16\n    path := \"./test.db\"\n    queueName := \"mfworkder\"\n    q := mfworker.NewQueue(count, maxItems, path, queueName, nil)\n    q.Handler(\"Test\", func(job *mfworker.Job) {\n        time.Sleep(time.Second)\n        log.Printf(\"the job name %s, job body %s \", job.Name, job.Payload)\n    })\n    q.Start()\n    go func() {\n        for i := 0; i \u003c 64; i++ {\n            job := \u0026mfworker.Job{\n                Name:    \"Test\",\n                Payload: []byte(\"body \" + strconv.Itoa(i)),\n            }\n            q.Dispatch(job)\n        }\n    }()\n    \u003c-time.After(10 * time.Second)\n    q.Stop()\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiflamed%2Fmfworker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiflamed%2Fmfworker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiflamed%2Fmfworker/lists"}