web / lib/constants/stage-time-weights
lib/constants/stage-time-weights
Stage time weights and configuration for import progress tracking.
This module defines estimated relative time weights for each processing stage, which are used to calculate weighted overall progress across stages. The weights are based on typical import characteristics and can be adjusted to better reflect actual processing times in your environment.
Type Aliases
StageTimeWeights
StageTimeWeights = typeof
STAGE_TIME_WEIGHTS
Type for stage time weights.
StageDisplayNames
StageDisplayNames = typeof
STAGE_DISPLAY_NAMES
Type for stage display names.
Variables
STAGE_TIME_WEIGHTS
constSTAGE_TIME_WEIGHTS:object
Estimated relative time weights for each processing stage.
These values are relative (not absolute time) and represent the typical proportion of time each stage takes during an import. The total of all active (non-zero) weights equals TOTAL_ACTIVE_WEIGHT.
Stages with weight 0 are excluded from progress calculations:
- AWAIT_APPROVAL: Manual user interaction, time unpredictable
- COMPLETED/FAILED: Terminal states
Type declaration
analyze-duplicates
readonlyanalyze-duplicates:10=10
detect-schema
readonlydetect-schema:15=15
validate-schema
readonlyvalidate-schema:5=5
await-approval
readonlyawait-approval:0=0
create-schema-version
readonlycreate-schema-version:5=5
geocode-batch
readonlygeocode-batch:30=30
create-events
readonlycreate-events:25=25
completed
readonlycompleted:0=0
failed
readonlyfailed:0=0
TOTAL_ACTIVE_WEIGHT
constTOTAL_ACTIVE_WEIGHT:90=90
Total weight of all active stages (excluding manual and terminal stages).
This is the sum of all non-zero weights and is used as the denominator when calculating weighted progress percentages.
STAGE_DISPLAY_NAMES
constSTAGE_DISPLAY_NAMES:object
User-friendly display names for each processing stage.
These names are used in UI components and API responses to provide clear, human-readable stage descriptions.
Type declaration
analyze-duplicates
readonlyanalyze-duplicates:"Analyzing Duplicates"="Analyzing Duplicates"
detect-schema
readonlydetect-schema:"Detecting Schema"="Detecting Schema"
validate-schema
readonlyvalidate-schema:"Validating Schema"="Validating Schema"
await-approval
readonlyawait-approval:"Awaiting Approval"="Awaiting Approval"
create-schema-version
readonlycreate-schema-version:"Creating Schema Version"="Creating Schema Version"
geocode-batch
readonlygeocode-batch:"Geocoding Locations"="Geocoding Locations"
create-events
readonlycreate-events:"Creating Events"="Creating Events"
completed
readonlycompleted:"Completed"="Completed"
failed
readonlyfailed:"Failed"="Failed"