Skip to content

Commit a5457ef

Browse files
committed
pid singletone
1 parent 0e4cf0a commit a5457ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/meta/meta.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ import (
1515
"github.com/ydb-platform/ydb-go-sdk/v3/trace"
1616
)
1717

18+
var pid = os.Getpid()
19+
1820
func New(
1921
database string,
2022
credentials credentials.Credentials,
2123
trace *trace.Driver,
2224
opts ...Option,
2325
) *Meta {
2426
m := &Meta{
25-
pid: strconv.Itoa(os.Getpid()),
27+
pid: strconv.Itoa(pid),
2628
trace: trace,
2729
credentials: credentials,
2830
database: database,

0 commit comments

Comments
 (0)