Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- feat: "start" and "stop" are now mutation prefixes [#889](https://github.com/hypermodeinc/modus/pull/889)
- fix: start agents synchronously, and add examples setting data on start [#890](https://github.com/hypermodeinc/modus/pull/890)
- fix: resolve deadlocks related to open inbound http connections [#891](https://github.com/hypermodeinc/modus/pull/891)
- fix: use millisecond precision in timestamps [#892](https://github.com/hypermodeinc/modus/pull/892)

## 2025-06-10 - Runtime 0.18.0-alpha.6

Expand Down
2 changes: 1 addition & 1 deletion runtime/actors/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (a *subscriptionActor) Receive(rc *goakt.ReceiveContext) {
event := &agentEvent{
Name: msg.Name,
Data: msg.Data,
Timestamp: msg.Timestamp.AsTime().Format(time.RFC3339),
Timestamp: msg.Timestamp.AsTime().Format(utils.TimeFormat),
}
if data, err := utils.JsonSerialize(event); err != nil {
rc.Err(fmt.Errorf("failed to serialize agent event message: %w", err))
Expand Down
2 changes: 1 addition & 1 deletion runtime/actors/wasmagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (a *wasmAgentActor) saveState(ctx context.Context) error {
Name: a.agentName,
Status: a.status,
Data: data,
UpdatedAt: time.Now().UTC().Format(time.RFC3339),
UpdatedAt: time.Now().UTC().Format(utils.TimeFormat),
}); err != nil {
return fmt.Errorf("error saving agent state to database: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/db/agentstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func updateAgentStatusInModusDB(ctx context.Context, id string, status string) e
}

state.Status = status
state.UpdatedAt = time.Now().UTC().Format(time.RFC3339)
state.UpdatedAt = time.Now().UTC().Format(utils.TimeFormat)

return writeAgentStateToModusDB(ctx, *state)
}
Expand Down Expand Up @@ -179,7 +179,7 @@ func getAgentStateFromPostgresDB(ctx context.Context, id string) (*AgentState, e
if err := row.Scan(&a.Id, &a.Name, &a.Status, &a.Data, &ts); err != nil {
return fmt.Errorf("failed to get agent state: %w", err)
}
a.UpdatedAt = ts.UTC().Format(time.RFC3339)
a.UpdatedAt = ts.UTC().Format(utils.TimeFormat)
return nil
})

Expand Down Expand Up @@ -210,7 +210,7 @@ func queryActiveAgentsFromPostgresDB(ctx context.Context) ([]AgentState, error)
if err := rows.Scan(&a.Id, &a.Name, &a.Status, &a.Data, &ts); err != nil {
return err
}
a.UpdatedAt = ts.UTC().Format(time.RFC3339)
a.UpdatedAt = ts.UTC().Format(utils.TimeFormat)
results = append(results, a)
}
if err := rows.Err(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion runtime/db/inferencehistory.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ func writeInferenceHistoryToModusDb(ctx context.Context, batch []inferenceHistor
ModelHash: data.model.Hash(),
Input: string(input),
Output: string(output),
StartedAt: data.start.Format(time.RFC3339),
StartedAt: data.start.Format(utils.TimeFormat),
DurationMs: data.end.Sub(data.start).Milliseconds(),
Function: funcStr,
Plugin: Plugin{
Expand Down
Loading