2022-11-30 10:51:24 +01:00
|
|
|
package tasker
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
QueueName string
|
|
|
|
TaskName string
|
|
|
|
)
|
|
|
|
|
|
|
|
type Task struct {
|
|
|
|
Id string `json:"id"`
|
|
|
|
Payload json.RawMessage `json:"payload"`
|
|
|
|
}
|
|
|
|
|
|
|
|
const (
|
2023-03-29 18:10:58 +02:00
|
|
|
AccountRegisterTask TaskName = "sys:register_account"
|
|
|
|
AccountRefillGasTask TaskName = "sys:refill_gas"
|
|
|
|
SignTransferTask TaskName = "usr:sign_transfer"
|
2023-07-10 08:32:05 +02:00
|
|
|
SignTransferTaskAuth TaskName = "usr:sign_transfer_auth"
|
2023-03-29 18:10:58 +02:00
|
|
|
DispatchTxTask TaskName = "rpc:dispatch"
|
2022-11-30 10:51:24 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
HighPriority QueueName = "high_priority"
|
|
|
|
DefaultPriority QueueName = "default_priority"
|
|
|
|
)
|