{"id":21361670,"url":"https://github.com/webpractik/agent","last_synced_at":"2025-07-13T02:32:22.676Z","repository":{"id":57079059,"uuid":"195387236","full_name":"webpractik/agent","owner":"webpractik","description":"Обертка для работы с агентами Битрикс","archived":false,"fork":false,"pushed_at":"2020-09-30T15:25:51.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-18T10:54:20.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/webpractik.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":"2019-07-05T10:05:12.000Z","updated_at":"2023-05-20T11:03:57.000Z","dependencies_parsed_at":"2022-08-24T14:56:22.774Z","dependency_job_id":null,"html_url":"https://github.com/webpractik/agent","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webpractik","download_url":"https://codeload.github.com/webpractik/agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225850218,"owners_count":17534067,"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":[],"created_at":"2024-11-22T06:10:53.026Z","updated_at":"2024-11-22T06:10:53.554Z","avatar_url":"https://github.com/webpractik.png","language":"PHP","readme":"# Обертка для работы с агентами Битрикс\n\nЗа основу был взят функционал для работы с агентами из console-jedi\n\n## Установка\n\n```bash\ncomposer require webpractik/agent\n```\n\n## Примеры\n\n##### Регистрация агента\nПроверяет, существует ли в БД агент. Если нет, то регистрирует его.\n\n```php\nuse Webpractik\\Agent\\AgentTask;\nuse Vendor\\Module\\TestAgent;\nuse Bitrix\\Main\\Type\\DateTime;\n\nAgentTask::build()\n    -\u003esetClass(TestAgent::class)\n    -\u003esetCallChain(\n        ['execute' =\u003e [$params]]\n    )\n    -\u003esetModule('vendor.module')\n    -\u003esetExecutionTime(DateTime::createFromTimestamp(time() + 60)) // optional\n    -\u003esetUserId(1) // optional\n    -\u003ecreate();\n```\n\n#### Пример метода\n\n```php\nnamespace Vendor\\Module;\n\nclass TestAgent\n{\n    use AgentTrait;\n\n    public function execute()\n    {\n        // some code\n\n        return $this-\u003egetAgentName(['execute' =\u003e []]); // метод обязательно должен вернуть имя агента\n    }\n}\n\n``` \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpractik%2Fagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebpractik%2Fagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpractik%2Fagent/lists"}