Feat: graceful shutdown
This commit is contained in:
@ -70,10 +70,11 @@ func getStateByCtx(ctx context.Context) (*models.UserState, error) {
|
||||
}
|
||||
|
||||
func saveFullInfo(fi *models.FullInfo) error {
|
||||
// INFO: unfortunately working no transactions; so case are possible where first object is updated but the second is not
|
||||
// INFO: no transactions; so case is possible where first object is updated but the second is not
|
||||
if err := saveState(fi.State.Username, fi.State); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Debug("saved user state", "state", fi.State)
|
||||
if err := saveRoom(fi.Room); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user