[PR #1885] [MERGED] feat: allow enabling or disabling specific workers #1921

Closed
opened 2026-03-02 11:59:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/1885
Author: @MohamedBassem
Created: 9/3/2025
Status: Merged
Merged: 9/7/2025
Merged by: @MohamedBassem

Base: mainHead: codex/add-allowlist-and-blocklist-env-variables


📝 Commits (1)

  • c766914 feat(workers): add worker enable/disable lists

📊 Changes

3 files changed (+71 additions, -44 deletions)

View changed files

📝 apps/workers/index.ts (+49 -44)
📝 docs/docs/03-configuration.md (+2 -0)
📝 packages/shared/config.ts (+20 -0)

📄 Description

Summary

  • add WORKERS_ENABLED_WORKERS and WORKERS_DISABLED_WORKERS env vars
  • allow workers binary to respect allowlist/blocklist
  • document new worker configuration options

Testing

  • pnpm lint --filter=@karakeep/shared --filter=@karakeep/workers --filter=@karakeep/docs
  • pnpm typecheck --filter=@karakeep/shared --filter=@karakeep/workers --filter=@karakeep/docs
  • pnpm test --filter=@karakeep/shared -- --run
  • pnpm format --filter=@karakeep/shared --filter=@karakeep/workers --filter=@karakeep/docs
  • pnpm exec prettier docs/docs/03-configuration.md --check

https://chatgpt.com/codex/tasks/task_e_68b806846494832ca5a59312328a6fbe

Summary by CodeRabbit

  • New Features
    • Added configuration to enable or disable specific background workers via environment variables: WORKERS_ENABLED_WORKERS and WORKERS_DISABLED_WORKERS (disabled takes precedence). Supports: crawler, inference, search, tidyAssets, video, feed, assetPreprocessing, webhook, ruleEngine.
  • Refactor
    • Switched to a config-driven, dynamic worker lifecycle with concurrent startup and graceful shutdown. Only enabled workers run; feed refreshing starts/stops only when relevant.
  • Documentation
    • Updated configuration docs to describe the new environment variables and usage.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/1885 **Author:** [@MohamedBassem](https://github.com/MohamedBassem) **Created:** 9/3/2025 **Status:** ✅ Merged **Merged:** 9/7/2025 **Merged by:** [@MohamedBassem](https://github.com/MohamedBassem) **Base:** `main` ← **Head:** `codex/add-allowlist-and-blocklist-env-variables` --- ### 📝 Commits (1) - [`c766914`](https://github.com/karakeep-app/karakeep/commit/c766914c5e9699623d3ab480cd6cd72bde2f2c8c) feat(workers): add worker enable/disable lists ### 📊 Changes **3 files changed** (+71 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `apps/workers/index.ts` (+49 -44) 📝 `docs/docs/03-configuration.md` (+2 -0) 📝 `packages/shared/config.ts` (+20 -0) </details> ### 📄 Description ## Summary - add `WORKERS_ENABLED_WORKERS` and `WORKERS_DISABLED_WORKERS` env vars - allow workers binary to respect allowlist/blocklist - document new worker configuration options ## Testing - `pnpm lint --filter=@karakeep/shared --filter=@karakeep/workers --filter=@karakeep/docs` - `pnpm typecheck --filter=@karakeep/shared --filter=@karakeep/workers --filter=@karakeep/docs` - `pnpm test --filter=@karakeep/shared -- --run` - `pnpm format --filter=@karakeep/shared --filter=@karakeep/workers --filter=@karakeep/docs` - `pnpm exec prettier docs/docs/03-configuration.md --check` ------ https://chatgpt.com/codex/tasks/task_e_68b806846494832ca5a59312328a6fbe <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Added configuration to enable or disable specific background workers via environment variables: WORKERS_ENABLED_WORKERS and WORKERS_DISABLED_WORKERS (disabled takes precedence). Supports: crawler, inference, search, tidyAssets, video, feed, assetPreprocessing, webhook, ruleEngine. - Refactor - Switched to a config-driven, dynamic worker lifecycle with concurrent startup and graceful shutdown. Only enabled workers run; feed refreshing starts/stops only when relevant. - Documentation - Updated configuration docs to describe the new environment variables and usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 11:59:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1921
No description provided.