{"id":28452609,"url":"https://github.com/livehelperchat/lhc-php-resque","last_synced_at":"2025-06-27T23:31:20.008Z","repository":{"id":46487244,"uuid":"78642470","full_name":"LiveHelperChat/lhc-php-resque","owner":"LiveHelperChat","description":"Enables php-resque functionality in Live Helper Chat","archived":false,"fork":false,"pushed_at":"2025-06-18T06:08:02.000Z","size":173,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-18T07:24:29.566Z","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/LiveHelperChat.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,"zenodo":null}},"created_at":"2017-01-11T13:38:57.000Z","updated_at":"2025-06-18T06:11:33.000Z","dependencies_parsed_at":"2024-02-18T01:00:19.753Z","dependency_job_id":"86c33e80-0d5f-48ec-be75-7c6d96da75e5","html_url":"https://github.com/LiveHelperChat/lhc-php-resque","commit_stats":{"total_commits":45,"total_committers":2,"mean_commits":22.5,"dds":0.06666666666666665,"last_synced_commit":"9c9d947ec425ef3c5f4e2aead7f07ec6c07b1c3e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/LiveHelperChat/lhc-php-resque","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiveHelperChat%2Flhc-php-resque","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiveHelperChat%2Flhc-php-resque/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiveHelperChat%2Flhc-php-resque/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiveHelperChat%2Flhc-php-resque/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiveHelperChat","download_url":"https://codeload.github.com/LiveHelperChat/lhc-php-resque/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiveHelperChat%2Flhc-php-resque/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262351475,"owners_count":23297627,"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":"2025-06-06T18:12:02.030Z","updated_at":"2025-06-27T23:31:20.000Z","avatar_url":"https://github.com/LiveHelperChat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lhc-php-resque\nEnables php-resque functionality in Live Helper Chat\n\n### Requirements\n\nLHC 2.52v\n\nMake sure background worker is running under same user as your web server.\n\n1. Copy lhcphpresque/doc/resque.php to main folder lhc_web. Just root folder where Live Helper Chat is installed.\n2. Copy lhc-php-resque/lhcphpresque to extension/lhcphpresque\n3. Activate extension in settings/settings.ini.php extensions section.\n```\n'extensions' =\u003e \n      array (\n        'lhcphpresque'\n      ),\n```\n4. Make sure you have composer dependencies installed in main app folder.\n```\ncd lhc_web/ \u0026\u0026 composer update\n```\n5. Make sure you copied extension/lhcphpresque/settings/settings.ini.default.php to extension/lhcphpresque/settings/settings.ini.php. Edit `queues` and add custom queues you have from other extension.\n\n6. To start resque worker for debug just use. You can decrease interval how often worker checks for new jobs by settings interval value to 1\n```\nREDIS_BACKEND=localhost:6379 INTERVAL=5 REDIS_BACKEND_DB=1 VERBOSE=1 COUNT=1 QUEUE='*' /usr/bin/php resque.php\n```\n\n7. Once you are happy how everything works. Before cronjob setup make sure you check their paths. First cronjob ensures that worker is started upon reboot. Second cronjob restarts worker every day (I suggest to keep it to avoid any memory leaks in php). Third one checks do we need to restart php resque or not. After code changes workers has to be restarted. Easiest way to restart is to create a lock file.\n```\n@reboot cd /var/www/web/extension/lhcphpresque/doc/ \u0026\u0026 ./phpresque.sh \u003e\u003e /dev/null 2\u003e\u00261\n40 7 * * * /bin/touch /var/www/web/extension/lhcphpresque/doc/runresque.lock \u003e /dev/null 2\u003e\u00261\n* * * * * cd /var/www/web/extension/lhcphpresque/doc \u0026\u0026 ./resque.sh \u003e\u003e /dev/null 2\u003e\u00261\n```\n\n8. Example schedule command\n```\necho \"Scheduling\\n\";\nerLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionLhcphpresque')-\u003eenqueue('lhc_dummy_queue', 'erLhcoreClassLHCDummyWorker', array('arguments' =\u003e 'first argument'));\n```\n\n9. Setup alerts for resque jobs overloads\n\nTo receive alerts about overload of jobs you have to setup cronjob to run every 5 minutes or so.\n\n```\n/usr/bin/php cron.php -s site_admin -e lhcphpresque -c cron/monitor\n```\n\nTo active for webhooks events. Modify main settings file.\n\n```\n 'webhooks' =\u003e\n    array (\n      'enabled' =\u003e true,\n      'worker' =\u003e 'resque'//'http',\n    ),\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivehelperchat%2Flhc-php-resque","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flivehelperchat%2Flhc-php-resque","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivehelperchat%2Flhc-php-resque/lists"}