Skip to content

Commit

Permalink
Merge pull request #133 from dogecoinfoundation/fix-shutdown
Browse files Browse the repository at this point in the history
Fix: shut down cleanly, remove unused service stubs
  • Loading branch information
raffecat authored Mar 26, 2024
2 parents 6224b66 + 580358f commit f8056b0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 104 deletions.
1 change: 1 addition & 0 deletions pkg/services/balancekeeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func (b BalanceKeeper) Run(started, stopped chan bool, stop chan context.Context
defer func() {
if r := recover(); r != nil {
log.Println("BalanceKeeper: panic received:", r)
stopped <- true
}
if b.tx != nil {
// shutdown during a transaction.
Expand Down
48 changes: 0 additions & 48 deletions pkg/services/invoicestamper.go

This file was deleted.

8 changes: 0 additions & 8 deletions pkg/services/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,4 @@ func StartServices(cond *conductor.Conductor, bus giga.MessageBus, conf giga.Con
// BalanceKeeper updates stored balances and sends ACC_BALANCE_CHANGE events.
keeper := NewBalanceKeeper(store, bus)
cond.Service("NewBalanceKeeper", keeper)

// InvoiceStamper sends "Invoice Paid" and "Invoice Partial Payment" events.
stamper := NewInvoiceStamper()
cond.Service("InvoiceStamper", stamper)

// PayMaster sends "Payment Accepted" and "Payment Confirmed" events.
master := NewPayMaster()
cond.Service("PayMaster", master)
}
48 changes: 0 additions & 48 deletions pkg/services/paymaster.go

This file was deleted.

0 comments on commit f8056b0

Please sign in to comment.