Skip to content

Commit

Permalink
chore(userservice): report status on app_subscriptions_check and stri…
Browse files Browse the repository at this point in the history
…pe_email_updater
  • Loading branch information
guybrush committed Sep 26, 2024
1 parent 115bf7f commit 4f17f95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/pkg/userservice/appsubscription_oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/gobitfly/beaconchain/pkg/commons/db"
"github.com/gobitfly/beaconchain/pkg/commons/log"
"github.com/gobitfly/beaconchain/pkg/commons/metrics"
"github.com/gobitfly/beaconchain/pkg/commons/services"
"github.com/gobitfly/beaconchain/pkg/commons/types"
"github.com/gobitfly/beaconchain/pkg/commons/utils"

Expand Down Expand Up @@ -93,6 +94,8 @@ func CheckMobileSubscriptions() {
updateValidationState(receipt, valid)
}

services.ReportStatus("app_subscriptions_check", "Running", nil)

log.InfoWithFields(log.Fields{"subscriptions": len(receipts), "duration": time.Since(start)}, "subscription update completed")
time.Sleep(time.Hour * 4)
}
Expand Down
3 changes: 3 additions & 0 deletions backend/pkg/userservice/stripe_email_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/gobitfly/beaconchain/pkg/commons/db"
"github.com/gobitfly/beaconchain/pkg/commons/log"
"github.com/gobitfly/beaconchain/pkg/commons/services"
"github.com/gobitfly/beaconchain/pkg/commons/utils"
"github.com/lib/pq"
)
Expand Down Expand Up @@ -50,6 +51,8 @@ func StripeEmailUpdater() {
}
}

services.ReportStatus("stripe_email_updater", "Running", nil)

time.Sleep(time.Minute)
}
}
Expand Down

0 comments on commit 4f17f95

Please sign in to comment.