Store failed requests in db for later retries
This commit is contained in:
parent
d86ad370df
commit
1c216e415d
8 changed files with 1292 additions and 250 deletions
|
@ -2,6 +2,7 @@ package models
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
@ -11,13 +12,15 @@ import (
|
|||
type RemoteServer struct {
|
||||
gorm.Model
|
||||
// The software the server is based on (Mastodon+Glitch => Mastodon, Sharkey => Misskey, Akoma => Plemora, etc)
|
||||
ServerType ServerSoftwareType
|
||||
SpecificType string // Specific software name (Sharkey, Iceshrimp, Akoma, etc)
|
||||
Version string
|
||||
Domain string // `gorm:"primaryKey"` // Domain the server exists under. Additional primary key
|
||||
Name string // What the server wants to be known as (usually same as url)
|
||||
Icon *MediaMetadata // The icon used by the server. May be empty
|
||||
IconId sql.NullString // ID of a media file
|
||||
IsSelf bool // Whether this server is yours truly
|
||||
Metadata []RemoteServerMetadata
|
||||
ServerType ServerSoftwareType
|
||||
SpecificType string // Specific software name (Sharkey, Iceshrimp, Akoma, etc)
|
||||
Version string
|
||||
Domain string // `gorm:"primaryKey"` // Domain the server exists under. Additional primary key
|
||||
Name string // What the server wants to be known as (usually same as url)
|
||||
Icon *MediaMetadata // The icon used by the server. May be empty
|
||||
IconId sql.NullString // ID of a media file
|
||||
IsSelf bool // Whether this server is yours truly
|
||||
Metadata []RemoteServerMetadata // Metadata a server provides in its nodeinfo
|
||||
LastInteraction time.Time // The last time the server was seen (sucessful outbound request or inbound message)
|
||||
IsDead bool // Whether to consider a server dead and not bother sending anything anymore
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue