Skip to content

feat: enable schedule interval.#373

Merged
k82cn merged 2 commits into
xflops:mainfrom
k82cn:config_sched_interval
Mar 15, 2026
Merged

feat: enable schedule interval.#373
k82cn merged 2 commits into
xflops:mainfrom
k82cn:config_sched_interval

Conversation

@k82cn
Copy link
Copy Markdown
Contributor

@k82cn k82cn commented Mar 15, 2026

Make schedule interval configurable.

Signed-off-by: Klaus Ma <klaus1982.cn@gmail.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new feature that makes the scheduler's loop interval configurable. Previously a hardcoded value, the interval can now be specified in the cluster configuration, providing greater flexibility and control over the system's resource allocation and task scheduling behavior. This change centralizes the configuration of the scheduler interval within the main cluster context.

Highlights

  • Configurable Scheduler Interval: The scheduler loop interval is now configurable via the schedule_interval property in the cluster configuration, allowing for dynamic adjustment of scheduling frequency.
  • Configuration Updates: Default configuration files (ci/flame-cluster-local.yaml, ci/flame-cluster.yaml, installer/flame-cluster.yaml) have been updated to reflect the new schedule_interval property.
  • Code Refactoring: The schedule_interval property was moved from the session_manager's local Context to the shared FlameClusterContext in common/src/ctx.rs, centralizing its definition and usage.
  • Logging Level Adjustment: The default RUST_LOG environment variable in compose.yaml was changed from debug to info for both fsm and fem services.
Changelog
  • ci/flame-cluster-local.yaml
    • Added the schedule_interval property with a default value of 100ms.
  • ci/flame-cluster.yaml
    • Added the schedule_interval property with a default value of 100ms.
  • common/src/ctx.rs
    • Introduced DEFAULT_SCHEDULE_INTERVAL constant.
    • Added schedule_interval field to FlameClusterYaml struct.
    • Added schedule_interval field to FlameCluster struct.
    • Updated TryFrom<FlameClusterYaml> for FlameCluster to initialize schedule_interval.
    • Updated Default for FlameCluster to include schedule_interval.
  • compose.yaml
    • Changed RUST_LOG environment variable from debug to info for the fsm service.
    • Changed RUST_LOG environment variable from debug to info for the fem service.
  • installer/flame-cluster.yaml
    • Added a commented-out schedule_interval property with its default value.
  • session_manager/src/scheduler/ctx.rs
    • Removed the DEFAULT_SCHEDULE_INTERVAL constant.
    • Removed the schedule_interval field from the Context struct.
  • session_manager/src/scheduler/mod.rs
    • Modified the run method to retrieve schedule_interval from FlameClusterContext.
    • Updated the thread::sleep call to use the configurable schedule_interval.
    • Removed schedule_interval from Context::new in test cases.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully introduces a configurable schedule interval for the scheduler, which is a valuable addition. The implementation is mostly clean, with good refactoring to centralize the new configuration. However, I've identified a significant issue with the use of a blocking sleep call within an asynchronous function, which can negatively impact performance. My review includes a comment with a suggestion to address this.

Comment thread session_manager/src/scheduler/mod.rs Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@k82cn k82cn merged commit 4edd981 into xflops:main Mar 15, 2026
5 checks passed
@k82cn k82cn deleted the config_sched_interval branch March 15, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant