{"id":19832924,"url":"https://github.com/tinywan/webman-lock","last_synced_at":"2025-05-01T16:33:45.908Z","repository":{"id":62550723,"uuid":"500757510","full_name":"Tinywan/webman-lock","owner":"Tinywan","description":"based on lua script redis lock for webman plugin","archived":false,"fork":false,"pushed_at":"2024-04-12T09:51:39.000Z","size":8,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-09T09:47:08.703Z","etag":null,"topics":["lock","redis","redis-lock","tinywan","webman","workerman"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/Tinywan.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":"2022-06-07T08:39:05.000Z","updated_at":"2024-04-13T07:10:44.000Z","dependencies_parsed_at":"2022-11-03T02:00:31.877Z","dependency_job_id":null,"html_url":"https://github.com/Tinywan/webman-lock","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinywan%2Fwebman-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tinywan","download_url":"https://codeload.github.com/Tinywan/webman-lock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224269094,"owners_count":17283627,"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":["lock","redis","redis-lock","tinywan","webman","workerman"],"created_at":"2024-11-12T11:38:58.252Z","updated_at":"2024-11-12T11:38:58.345Z","avatar_url":"https://github.com/Tinywan.png","language":"PHP","readme":"# based on lua script redis lock for webman plugin\n\n[![Latest Stable Version](http://poser.pugx.org/tinywan/webman-lock/v)](https://packagist.org/packages/tinywan/webman-lock) \n[![Total Downloads](http://poser.pugx.org/tinywan/webman-lock/downloads)](https://packagist.org/packages/tinywan/webman-lock) \n[![Latest Unstable Version](http://poser.pugx.org/tinywan/webman-lock/v/unstable)](https://packagist.org/packages/tinywan/webman-lock) \n[![License](http://poser.pugx.org/tinywan/webman-lock/license)](https://packagist.org/packages/tinywan/webman-lock) \n[![PHP Version Require](http://poser.pugx.org/tinywan/webman-lock/require/php)](https://packagist.org/packages/tinywan/webman-lock)\n\n## 安装\n\n```shell\ncomposer require tinywan/webman-lock\n```\n\n## 使用\n\n```php\n// 锁名称\n$lockName = md5((string) time());\n// 锁标识\n$lockId = \\Tinywan\\Lock\\RedisLock::acquire($lockName);\nif (!$lockId) {\n    return '未获得锁标识，请稍后再试';\n}\n\n// 业务处理\n\n// 释放锁\n\\Tinywan\\Lock\\RedisLock::release($lockName, $lockId);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywan%2Fwebman-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinywan%2Fwebman-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywan%2Fwebman-lock/lists"}