AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

feat(platform): Move SchedulerService from RestService pod to WebsocketService pod to make it singleton

Open majdyz opened this issue 8 months ago β€’ 4 comments

Scheduler needs to be a singleton.

Changes πŸ—οΈ

Move the scheduler from RestService pod to WebsocketService pod to make it singleton

Checklist πŸ“‹

For code changes:

  • [x] I have clearly listed my changes in the PR description
  • [x] I have made a test plan
  • [x] I have tested my changes according to the test plan:
    • [x] Add scheduled agent

majdyz avatar Apr 10 '25 20:04 majdyz

PR Reviewer Guide πŸ”

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 πŸ”΅πŸ”΅βšͺβšͺβšͺ
πŸ§ͺΒ No relevant tests
πŸ”’Β No security concerns identified
⚑ Recommended focus areas for review

Multiple run_processes Calls

The code calls run_processes twice in sequence. This might lead to unexpected behavior as each call could start separate process groups. Consider combining both services into a single run_processes call.

run_processes(Scheduler())
run_processes(WebsocketServer())

qodo-code-review[bot] avatar Apr 10 '25 20:04 qodo-code-review[bot]

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
Latest commit eae8186bdaf59a485903061d2ed9a8ef4460ef85
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67fd26da1afb750008ed7c60

netlify[bot] avatar Apr 10 '25 20:04 netlify[bot]

Here's the code health analysis summary for commits d791cde..eae8186. View details on DeepSourceΒ β†—.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScriptβœ…Β SuccessView CheckΒ β†—
DeepSource Python LogoPythonβœ…Β SuccessView CheckΒ β†—

πŸ’‘ If you’re a repository administrator, you can configure the quality gates from the settings.

deepsource-io[bot] avatar Apr 10 '25 20:04 deepsource-io[bot]

Deploy Preview for auto-gpt-docs canceled.

Name Link
Latest commit eae8186bdaf59a485903061d2ed9a8ef4460ef85
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67fd26dae52d6a00082e6b6e

netlify[bot] avatar Apr 10 '25 20:04 netlify[bot]

I have done the infra work to make this its own pod. Do you want to move it or me to?

ntindle avatar Apr 30 '25 13:04 ntindle

@ntindle feel free to do it. I'll close this PR

majdyz avatar Apr 30 '25 13:04 majdyz