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-02-20 10:56:30 +01:00
|
|
|
AccountPrepareTask TaskName = "sys:prepare_account"
|
|
|
|
AccountRegisterTask TaskName = "sys:register_account"
|
|
|
|
AccountGiftGasTask TaskName = "sys:gift_gas"
|
|
|
|
AccountGiftVoucherTask TaskName = "sys:gift_token"
|
|
|
|
AccountRefillGasTask TaskName = "sys:refill_gas"
|
2023-03-08 07:49:09 +01:00
|
|
|
AccountActivateTask TaskName = "sys:quorum_check"
|
2023-02-15 08:05:43 +01:00
|
|
|
SignTransferTask TaskName = "usr:sign_transfer"
|
2023-02-20 10:56:30 +01:00
|
|
|
DispatchTxTask TaskName = "rpc:dispatch"
|
2022-11-30 10:51:24 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
HighPriority QueueName = "high_priority"
|
|
|
|
DefaultPriority QueueName = "default_priority"
|
|
|
|
)
|