[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M757XFW026CG2341RW5QHCZQ":3,"skill-same:01M757XFW026CG2341RW5QHCZQ":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M757XFW026CG2341RW5QHCZQ","arq-worker-startup-pitfalls",null,"Use when an arq worker crash-loops or runs no jobs.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Farq-worker-startup-pitfalls\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: arq-worker-startup-pitfalls\ndescription: >-\n  Use when an arq worker crash-loops or runs no jobs.\nversion: 1.0.0\ncategory: devops\nplatforms: [linux, macos]\n---\n\n# arq Worker Startup Pitfalls\n\nThree independent failures that all look like \"the worker container won't\nstay up\". Check them in order.\n\n## 1. `TypeError: 'type' object is not iterable` at `map(func, functions)`\n\n**Cause:** arq 0.28's `Worker.__init__` takes `functions` as its FIRST\npositional argument. Calling `Worker(WorkerSettings)` passes the settings\nclass itself as the functions sequence:\n\n```python\n# ❌ BAD — passes the class, not its functions\nasyncio.run(Worker(WorkerSettings).run())\n# TypeError: 'type' object is not iterable\n```\n\n**Fix:** use the exported `run_worker()` helper, which expands the settings\nclass via `get_kwargs()` and blocks running the loop (`Worker.run()` is\nsynchronous):\n\n```python\nfrom arq import run_worker\n\nclass WorkerSettings:\n    functions = JOB_FUNCTIONS          # list of async funcs\n    redis_settings = _arq_settings()   # arq.connections.RedisSettings\n    ...\n\nrun_worker(WorkerSettings)             # blocks, runs the worker loop\n```\n\nNote: `create_worker` exists in `arq.worker` but is NOT exported from\n`arq\u002F__init__.py` in 0.28 — `from arq import create_worker` raises\nImportError. Use `run_worker`.\n\n## 2. Worker runs uvicorn (or nothing) instead of its job script\n\n**Cause A — entrypoint ignores CMD:** the image ENTRYPOINT ends with\n`exec uvicorn ...` unconditionally, so compose `command: python3\narq_worker.py` is discarded. Fix: exec the supplied command when present,\nfall back to the API server:\n\n```bash\nif [ \"$#\" -gt 0 ]; then\n    exec \"$@\"\nfi\nexec .venv\u002Fbin\u002Fuvicorn app.main:app ...\n```\n\n**Cause B — job script missing from image:** the Dockerfile never\n`COPY`s the worker entrypoint (`arq_worker.py`). Add it:\n\n```dockerfile\nCOPY arq_worker.py .\u002F\n```\n\n## 3. Worker connects to the wrong Redis port\n\n**Cause:** `.env` carries the HOST-side published port (e.g.\n`REDIS_PORT=13212`) and it leaks into containers via `env_file: .env`.\nInside the compose network Redis listens on 6379, so the worker logs\n`redis=redis:13212` and can't connect.\n\n**Fix:** pin the internal port explicitly in the compose service\nenvironment (overrides env_file):\n\n```yaml\n    environment:\n      REDIS_HOST: redis\n      REDIS_PASSWORD: ${REDIS_PASSWORD:-your-redis-password}\n      REDIS_PORT: 6379\n```\n\n## Verification\n\n```bash\ndocker ps --format '{{.Names}}\\t{{.Status}}' | grep worker   # Up, not Restarting\ndocker logs worker | tail -10\n# expect: Starting worker for N functions: ...\n#         redis_version=... clients_connected=1\n```\n\n## Pitfalls\n\n- Images with baked `\u002Fapp` need a rebuild (`.\u002Frun build worker`) for\n  `arq_worker.py` \u002F entrypoint changes; `docker cp` is only a temporary\n  dev-loop test.\n- Check the pinned arq version in `uv.lock` before using API helpers —\n  0.28 exports `run_worker`, not `create_worker`.\n","# arq Worker Startup Pitfalls\n\nThree independent failures that all look like \"the worker container won't\nstay up\". Check them in order.\n\n## 1. `TypeError: 'type' object is not iterable` at `map(func, functions)`\n\n**Cause:** arq 0.28's `Worker.__init__` takes `functions` as its FIRST\npositional argument. Calling `Worker(WorkerSettings)` passes the settings\nclass itself as the functions sequence:\n\n```python\n# ❌ BAD — passes the class, not its functions\nasyncio.run(Worker(WorkerSettings).run())\n# TypeError: 'type' object is not iterable\n```\n\n**Fix:** use the exported `run_worker()` helper, which expands the settings\nclass via `get_kwargs()` and blocks running the loop (`Worker.run()` is\nsynchronous):\n\n```python\nfrom arq import run_worker\n\nclass WorkerSettings:\n    functions = JOB_FUNCTIONS          # list of async funcs\n    redis_settings = _arq_settings()   # arq.connections.RedisSettings\n    ...\n\nrun_worker(WorkerSettings)             # blocks, runs the worker loop\n```\n\nNote: `create_worker` exists in `arq.worker` but is NOT exported from\n`arq\u002F__init__.py` in 0.28 — `from arq import create_worker` raises\nImportError. Use `run_worker`.\n\n## 2. Worker runs uvicorn (or nothing) instead of its job script\n\n**Cause A — entrypoint ignores CMD:** the image ENTRYPOINT ends with\n`exec uvicorn ...` unconditionally, so compose `command: python3\narq_worker.py` is discarded. Fix: exec the supplied command when present,\nfall back to the API server:\n\n```bash\nif [ \"$#\" -gt 0 ]; then\n    exec \"$@\"\nfi\nexec .venv\u002Fbin\u002Fuvicorn app.main:app ...\n```\n\n**Cause B — job script missing from image:** the Dockerfile never\n`COPY`s the worker entrypoint (`arq_worker.py`). Add it:\n\n```dockerfile\nCOPY arq_worker.py .\u002F\n```\n\n## 3. Worker connects to the wrong Redis port\n\n**Cause:** `.env` carries the HOST-side published port (e.g.\n`REDIS_PORT=13212`) and it leaks into containers via `env_file: .env`.\nInside the compose network Redis listens on 6379, so the worker logs\n`redis=redis:13212` and can't connect.\n\n**Fix:** pin the internal port explicitly in the compose service\nenvironment (overrides env_file):\n\n```yaml\n    environment:\n      REDIS_HOST: redis\n      REDIS_PASSWORD: ${REDIS_PASSWORD:-your-redis-password}\n      REDIS_PORT: 6379\n```\n\n## Verification\n\n```bash\ndocker ps --format '{{.Names}}\\t{{.Status}}' | grep worker   # Up, not Restarting\ndocker logs worker | tail -10\n# expect: Starting worker for N functions: ...\n#         redis_version=... clients_connected=1\n```\n\n## Pitfalls\n\n- Images with baked `\u002Fapp` need a rebuild (`.\u002Frun build worker`) for\n  `arq_worker.py` \u002F entrypoint changes; `docker cp` is only a temporary\n  dev-loop test.\n- Check the pinned arq version in `uv.lock` before using API helpers —\n  0.28 exports `run_worker`, not `create_worker`.\n",{"name":5,"version":24,"category":25,"platforms":26,"description":7},"1.0.0","devops",[27,28],"linux","macos","main","2e6aa8d15ab0a366c90be54f61bf9c6e97015e83","skills\u002Fdevops\u002Farq-worker-startup-pitfalls",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill arq-worker-startup-pitfalls",{"tool":44,"command":45},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill arq-worker-startup-pitfalls",{"tool":47,"command":48},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill arq-worker-startup-pitfalls","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Farq-worker-startup-pitfalls\u002FSKILL.md",true,[],[53,61,68,75,82,89],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":60},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":60},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":60},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":60},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":60},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":60},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]