The client and worker are heavyweight objects that should be created once per process

This line is put on the examples in samples-go repo.

Does that mean I need to create the client and worker every time I want to run existing workflow or register new workflow? That sounds unintuitive to me.

The intention of the comment is to communicate that worker and client should be created once and reused for the lifetime of the process.

1 Like