v1.27.0-a #10
@ -86,7 +86,7 @@ var wdPostTaskCmd = &cli.Command{
|
|||||||
|
|
||||||
retryDelay := time.Millisecond * 10
|
retryDelay := time.Millisecond * 10
|
||||||
retryAddTask:
|
retryAddTask:
|
||||||
_, err = deps.db.BeginTransaction(ctx, func(tx *harmonydb.Tx) (commit bool, err error) {
|
_, err = deps.DB.BeginTransaction(ctx, func(tx *harmonydb.Tx) (commit bool, err error) {
|
||||||
err = tx.QueryRow(`INSERT INTO harmony_task (name, posted_time, added_by) VALUES ('WdPost', CURRENT_TIMESTAMP, 123) RETURNING id`).Scan(&id)
|
err = tx.QueryRow(`INSERT INTO harmony_task (name, posted_time, added_by) VALUES ('WdPost', CURRENT_TIMESTAMP, 123) RETURNING id`).Scan(&id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("inserting harmony_task: ", err)
|
log.Error("inserting harmony_task: ", err)
|
||||||
|
@ -123,6 +123,7 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c
|
|||||||
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-worker"))
|
ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-worker"))
|
||||||
return ctx
|
return ctx
|
||||||
},
|
},
|
||||||
|
Addr: dependencies.ListenAddr,
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user