Skip to content

Commit

Permalink
gs: Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
onizmx committed Jun 10, 2024
1 parent 2d27c22 commit fba8a30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/gatewayserver/io/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ func (c *Connection) ScheduleDown(path *ttnpb.DownlinkPath, msg *ttnpb.DownlinkM
RTTs: c.rtts,
Priority: request.Priority,
UplinkToken: uplinkToken, // uplinkToken is always present with class A downlink, but may be nil otherwise.
GatewayId: c.gateway.Ids.GatewayId,
})
if err != nil {
logger.WithError(err).Debug("Failed to schedule downlink in Rx window")
Expand Down
4 changes: 4 additions & 0 deletions pkg/gatewayserver/scheduling/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ type Options struct {
RTTs RTTs
Priority ttnpb.TxSchedulePriority
UplinkToken *ttnpb.UplinkToken
GatewayId string

Check warning on line 287 in pkg/gatewayserver/scheduling/scheduler.go

View workflow job for this annotation

GitHub Actions / Code Quality

var-naming: struct field GatewayId should be GatewayID (revive)
}

// ScheduleAt attempts to schedule the given Tx settings with the given priority.
Expand Down Expand Up @@ -323,6 +324,9 @@ func (s *Scheduler) ScheduleAt(ctx context.Context, opts Options) (res Emission,
if !ok {
// Bryan: we can simply fail here to block all Class B and C transmission
// when gateway gps time is nil in clock.go.
log.FromContext(ctx).WithFields(log.Fields(
"id", opts.GatewayId,
)).Info("Bryan here is the failed one")
return Emission{}, 0, errNoAbsoluteGatewayTime.New()
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const DeploymentComponentStatus = () => (
<Row className={style.componentSection}>
<Col sm={4} className={style.versionInfoSection}>
<Message content={m.versionInfo} component="h3" className="panel-title" />
<span className={style.versionValue}>TTS v{process.env.VERSION}</span>
<span className={style.versionValue}>TTS v{process.env.VERSION} GPS Time Fix</span>
<pre className={style.versionRevision}>{process.env.REVISION}</pre>
<Link.Anchor href={statusPageBaseUrl} external secondary>
<Message content={m.statusPage} />
Expand Down

0 comments on commit fba8a30

Please sign in to comment.