Skip to content

Commit 80d2c12

Browse files
authored
chore(userservice): report status on app_subscriptions_check and stripe_email_updater (#890)
BEDS-90
1 parent a84c607 commit 80d2c12

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

backend/pkg/userservice/appsubscription_oracle.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/gobitfly/beaconchain/pkg/commons/db"
1313
"github.com/gobitfly/beaconchain/pkg/commons/log"
1414
"github.com/gobitfly/beaconchain/pkg/commons/metrics"
15+
"github.com/gobitfly/beaconchain/pkg/commons/services"
1516
"github.com/gobitfly/beaconchain/pkg/commons/types"
1617
"github.com/gobitfly/beaconchain/pkg/commons/utils"
1718

@@ -93,6 +94,8 @@ func CheckMobileSubscriptions() {
9394
updateValidationState(receipt, valid)
9495
}
9596

97+
services.ReportStatus("app_subscriptions_check", "Running", nil)
98+
9699
log.InfoWithFields(log.Fields{"subscriptions": len(receipts), "duration": time.Since(start)}, "subscription update completed")
97100
time.Sleep(time.Hour * 4)
98101
}

backend/pkg/userservice/stripe_email_updater.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
"github.com/gobitfly/beaconchain/pkg/commons/db"
1212
"github.com/gobitfly/beaconchain/pkg/commons/log"
13+
"github.com/gobitfly/beaconchain/pkg/commons/services"
1314
"github.com/gobitfly/beaconchain/pkg/commons/utils"
1415
"github.com/lib/pq"
1516
)
@@ -50,6 +51,8 @@ func StripeEmailUpdater() {
5051
}
5152
}
5253

54+
services.ReportStatus("stripe_email_updater", "Running", nil)
55+
5356
time.Sleep(time.Minute)
5457
}
5558
}

0 commit comments

Comments
 (0)