{"id":16389289,"url":"https://github.com/marcelog/mysql_minionpool","last_synced_at":"2026-06-17T18:02:17.966Z","repository":{"id":13296557,"uuid":"15982613","full_name":"marcelog/mysql_minionpool","owner":"marcelog","description":"a MySQL minionpool","archived":false,"fork":false,"pushed_at":"2014-02-07T20:50:43.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-30T12:51:34.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/marcelog.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}},"created_at":"2014-01-16T22:12:38.000Z","updated_at":"2014-02-07T20:50:44.000Z","dependencies_parsed_at":"2022-08-29T00:50:58.967Z","dependency_job_id":null,"html_url":"https://github.com/marcelog/mysql_minionpool","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/marcelog/mysql_minionpool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Fmysql_minionpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Fmysql_minionpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Fmysql_minionpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Fmysql_minionpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelog","download_url":"https://codeload.github.com/marcelog/mysql_minionpool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2Fmysql_minionpool/sbom","scorecard":{"id":617620,"data":{"date":"2025-08-11","repo":{"name":"github.com/marcelog/mysql_minionpool","commit":"b41175976499a129c594c31a09a1c830010ad793"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T04:22:44.420Z","repository_id":13296557,"created_at":"2025-08-21T04:22:44.420Z","updated_at":"2025-08-21T04:22:44.420Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34459619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":[],"created_at":"2024-10-11T04:32:15.829Z","updated_at":"2026-06-17T18:02:17.911Z","avatar_url":"https://github.com/marcelog.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\nExtends [minionpool](https://github.com/marcelog/minionpool) to have worker\npools that can process rows from a mysql table. It uses [node-mysql](https://github.com/felixge/node-mysql) as its MySQL driver.\n\n## Installing it\nThe npm package is called **mysql_minionpool**.\n\n## Using it\nIt's used as a standard [minionpool](https://github.com/marcelog/minionpool), you\nonly need to provide some of the callbacks and **mysql_minionpool** will do the \nrest (see below).\n\n### Example\nHere's a simple program that will use **mysql_minionpool** to process a whole\ntable paginating the rows, suitable to process a large number of rows.\n\n```js\nvar pool = new mysqlMinionPoolMod.MysqlMinionPool({\n  mysqlConfig: {\n    host: '127.0.0.1',\n    user: 'root',\n    password: 'pass',\n    database: 'db',\n    port: 3306\n  },\n  concurrency: 5,    // How many pages to get concurrently...\n  rowConcurrency: 1, // ... and how many concurrent rows processed PER query\n\n  // Since we're paginating, let's create a state where we can store the\n  // current page and the total rows per page.\n  // First argument is the error, if something failed.\n  taskSourceStart: function(callback) {\n    callback(undefined, {page: 0, pageSize: 10});\n  },\n\n  // Called to retrieve rows to process (a page, in our case). In the 'state'\n  // variable, there will be a property state.mysqlPool that grants mysql\n  // access.\n  taskSourceNext: function(state, callback) {\n    var db = 'db';\n    var table = 'table';\n    var query = \"SELECT * FROM `\" + db + \"`.`\" + table + \"` LIMIT ?,?\";\n    state.mysqlPool.getConnection(function(err, mysqlConnection) {\n      if(err) {\n        callback(err, undefined);\n      } else {\n        mysqlConnection.query(\n          query, [state.page * state.pageSize, state.pageSize], function(err, rows) {\n            mysqlConnection.release();\n            // First argument for the callback is the error, if something failed.\n            if(err) {\n              callback(err, undefined);\n            } else if(rows.length === 0) {\n              callback(undefined, undefined);\n            } else {\n              callback(undefined, rows);\n            }\n          }\n        );\n      }\n    });\n    state.page++;\n    return state;\n  },\n\n  // The handle also gets state.mysqlPool.\n  minionTaskHandler: function(task, state, callback) {\n    console.log('item: ' + util.inspect(task));\n    // First argument is the error, if something failed.\n    callback(undefined, state);\n  },\n\n  poolEnd: function() {\n    console.log('done');\n  },\n});\npool.start();\n```\n\n## Using multiple cores\n\nIn the case of having rabbitmq and mysql workers, it's very useful to take advantage\nof multicore cpu's. For this, you can use [taskset](http://linuxcommand.org/man_pages/taskset1.html)\nand launch multiple minionpool instances on different cores.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Fmysql_minionpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelog%2Fmysql_minionpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Fmysql_minionpool/lists"}