Migrate periodic tasks from Concurrent::TimerTask to EventMachine timers #91

Open
opened 2026-03-15 04:13:08 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: refactor(server): replace TimerTask with EventMachine timers
  • Branch: feature/m1-eventmachine-migration

Background and Context

The server currently uses Concurrent::TimerTask for two periodic jobs: the update
cycle ($manager.update_all at ServerConfig.update_rate) and the save cycle
($manager.save_all at ServerConfig.save_rate). With EventMachine, these should
use EventMachine.add_periodic_timer for consistency with the reactor pattern.

Expected Behavior

  • updateTask replaced with EventMachine.add_periodic_timer(update_rate) { ... }
  • saveTask replaced with EventMachine.add_periodic_timer(save_rate) { ... }
  • Timer intervals respect the same ServerConfig values

Acceptance Criteria

  • No Concurrent::TimerTask usage in server.rb
  • Both periodic tasks run on EM timers
  • Update and save cycles function correctly
  • Timer intervals match ServerConfig values

Subtasks

  • Replace updateTask with EM periodic timer
  • Replace saveTask with EM periodic timer
  • Verify timer intervals match config
  • Run tests, verify periodic operations work

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the
    Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata.
  • The commit is submitted as a pull request to master, reviewed, and merged.
## Metadata - **Commit Message**: `refactor(server): replace TimerTask with EventMachine timers` - **Branch**: `feature/m1-eventmachine-migration` ## Background and Context The server currently uses `Concurrent::TimerTask` for two periodic jobs: the update cycle (`$manager.update_all` at `ServerConfig.update_rate`) and the save cycle (`$manager.save_all` at `ServerConfig.save_rate`). With EventMachine, these should use `EventMachine.add_periodic_timer` for consistency with the reactor pattern. ## Expected Behavior - `updateTask` replaced with `EventMachine.add_periodic_timer(update_rate) { ... }` - `saveTask` replaced with `EventMachine.add_periodic_timer(save_rate) { ... }` - Timer intervals respect the same `ServerConfig` values ## Acceptance Criteria - No `Concurrent::TimerTask` usage in server.rb - Both periodic tasks run on EM timers - Update and save cycles function correctly - Timer intervals match ServerConfig values ## Subtasks - [ ] Replace updateTask with EM periodic timer - [ ] Replace saveTask with EM periodic timer - [ ] Verify timer intervals match config - [ ] Run tests, verify periodic operations work ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged**.
freemo added this to the v1.3.0 milestone 2026-03-15 04:13:08 +00:00
freemo self-assigned this 2026-03-15 04:25:24 +00:00
freemo modified the milestone from v1.3.0 to v1.0.0 2026-03-16 00:27:59 +00: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.

Reference: aethyr/Aethyr#91
No description provided.