Skip to content

Commit

Permalink
Disable ShipRemoval event, update content for Anniversary 2021
Browse files Browse the repository at this point in the history
+ Cleanup of tailwind builds
  • Loading branch information
Rukenshia committed Oct 19, 2021
1 parent 2aed1da commit e817f8e
Show file tree
Hide file tree
Showing 11 changed files with 854 additions and 1,011 deletions.
11 changes: 5 additions & 6 deletions backend/functions/refresh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@ func Handler(ctx context.Context, event awsEvents.SNSEvent) (string, error) {
if _, isInStatistics := newData[storedShip.ShipID]; isInStatistics {
newData[storedShip.ShipID].Private.InGarage = false
}
sentryShipHub.CaptureMessage("ShipRemoval: no longer in garage")
// sentryShipHub.CaptureMessage("ShipRemoval: no longer in garage")

if err := events.Add(events.NewShipRemoval(ev.AccountID, storedShip.ShipID)); err != nil {
getHub(sentryShipHub, E{"error": err.Error()}).CaptureMessage("Could not send ShipRemoval event")
log.Printf("WARN: could not send event for removed subscriber ship error=%v", err)
}
// if err := events.Add(events.NewShipRemoval(ev.AccountID, storedShip.ShipID)); err != nil {
// getHub(sentryShipHub, E{"error": err.Error()}).CaptureMessage("Could not send ShipRemoval event")
// log.Printf("WARN: could not send event for removed subscriber ship error=%v", err)
// }
}
}
}
Expand Down Expand Up @@ -282,7 +282,6 @@ func Handler(ctx context.Context, event awsEvents.SNSEvent) (string, error) {
sentryShipHub.ConfigureScope(func(scope *sentry.Scope) {
scope.SetTag("ShipID", fmt.Sprintf("%d", ship.ShipID))
})
log.Printf("Comparing ship=%d player=%s in_garage=%v", ship.ShipID, subscriberData.AccountID, ship.Private.InGarage)

wowsShip, ok := wows.Ships[ship.ShipID]
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion backend/functions/schedule/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type Request struct {
func Handler(ctx context.Context, request Request) (string, error) {
defer sentry.Flush(5 * time.Second)
log.Printf("Scheduler started")
want := time.Now().Add(-360 * time.Minute)
want := time.Now().Add(-(60 * 12) * time.Minute)

if request.RefreshAll {
want = time.Now()
Expand Down
15 changes: 8 additions & 7 deletions backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ provider:
name: aws
runtime: go1.x
region: eu-central-1
logRetentionInDays: 7
deploymentBucket:
tags:
Application: whaling
Expand Down Expand Up @@ -86,11 +87,11 @@ functions:
SENTRY_DSN: ${file(.env.live.yml):SentryDsn}
TOPIC_ARN:
Ref: SNSTopic
# events:
# - http:
# cors: true
# path: /subscribers/{accountId}/refresh
# method: get
events:
- http:
cors: true
path: /subscribers/{accountId}/refresh
method: get

manualRefresh:
handler: bin/refresh
Expand Down Expand Up @@ -147,7 +148,7 @@ functions:
TOPIC_ARN:
Ref: SNSTopic
events:
- schedule: rate(30 minutes)
- schedule: rate(6 hours)

generateGlobalStats:
handler: bin/generateGlobalStats
Expand All @@ -157,7 +158,7 @@ functions:
APPLICATION_ID: ${file(.env.live.yml):ApplicationID}
SENTRY_DSN: ${file(.env.live.yml):SentryDsn}
events:
- schedule: rate(24 hours)
- schedule: rate(12 hours)

resources:
Resources:
Expand Down
Loading

0 comments on commit e817f8e

Please sign in to comment.