-
Notifications
You must be signed in to change notification settings - Fork 134
Description
sdk-python/temporalio/worker/_worker.py
Line 206 in 162cff7
build_id: Unique identifier for the current runtime. This is best |
Current comment reads:
build_id: Unique identifier for the current runtime. This is best
set as a hash of all code and should change only when code does.
If unset, a best-effort identifier is generated.
On initialization the best-effort process results in walking and MD5 hashing every module in the codebase, this is normally fast but in very large codebases (15M+ lines of code) this can result in a very long wait for worker to boot.
Code comment should include a warning about long initialization times for large codebases, here is a potential replacement for inspiration:
A unique identifier for the current runtime. This value should ideally be provided as a hash of the complete source code and must change only when the code itself changes.
If not explicitly set, the system automatically generates a best-effort identifier by traversing and computing hashes of all modules in the codebase. In very large codebases this automatic process may significantly increase initialization time.