Skip to content

fix: add Modal workers for aggregate/change-aggregate computation#70

Merged
nikhilwoodruff merged 1 commit intomainfrom
fix/aggregate-modal-workers
Jan 11, 2026
Merged

fix: add Modal workers for aggregate/change-aggregate computation#70
nikhilwoodruff merged 1 commit intomainfrom
fix/aggregate-modal-workers

Conversation

@nikhilwoodruff
Copy link
Contributor

Aggregate and change-aggregate endpoints were stuck in "computing" status because there was no worker to compute them.

Changes:

  • Added status and error_message fields to AggregateOutput and ChangeAggregate models
  • Added Modal functions: compute_aggregate_uk/us, compute_change_aggregate_uk/us
  • API endpoints now trigger Modal workers on POST, returning status="pending"
  • Client can poll GET until status="completed" to get results

The aggregate workers load the simulation, run the calculation, and write results directly to the database.

Aggregate and change-aggregate endpoints were stuck in "computing" status
because there was no worker to compute them. This adds:

- Status fields to AggregateOutput and ChangeAggregate models
- Modal functions: compute_aggregate_uk/us, compute_change_aggregate_uk/us
- API endpoints now trigger Modal workers on POST

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nikhilwoodruff nikhilwoodruff merged commit a0bdca9 into main Jan 11, 2026
1 check passed
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