khoj-ai / khoj

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (e.g gpt, claude, gemini, llama, qwen, mistral).
https://khoj.dev
GNU Affero General Public License v3.0
14.09k stars 702 forks source link

Allow just one worker to be the background schedule leader #836

Closed sabaimran closed 4 months ago

sabaimran commented 4 months ago

In order to avoid additional load on the DB and server in production, elect only one worker to be the background schedule leader to run and execute automations. The other workers are started in a paused state, allowing them to delete and add new jobs, but not running jobs.