>L: process_pending_jobs()
L->>L: WidgetSettingRepository.update_price_widgets_bulk()
Note over L,DDB: Scan all widgets type='price'
to collect unique product_ids
L->>DDB: Scan widget_setting
FilterExpression: type='price'
DDB-->>L: price widgets list (paginated)
L->>L: Collect unique product_ids
Note over L,K: Bulk fetch prices in ONE request
L->>K: GET /k/v1/records.json
app=79, query: 商品ID in ("id1","id2",...)
K-->>L: records (prices)
loop For each price widget
L->>DDB: UpdateItem Key(id, type='price')
>L: process_pending_jobs()
L->>L: WidgetSettingRepository.update_price_widgets_bulk()
Note over L,DDB: Scan all widgets type='price'
to collect unique product_ids
L->>DDB: Scan widget_setting
FilterExpression: type='price'
DDB-->>L: price widgets list (paginated)
L->>L: Collect unique product_ids
Note over L,K: Bulk fetch prices in ONE request
L->>K: GET /k/v1/records.json
app=79, query: 商品ID in ("id1","id2",...)
K-->>L: records (prices)
loop For each price widget
L->>DDB: UpdateItem Key(id, type='price')
>L: process_pending_jobs()
L->>L: WidgetSettingRepository.update_price_widgets_bulk()
Note over L,DDB: Scan all widgets type='price'
to collect unique product_ids
L->>DDB: Scan widget_setting
FilterExpression: type='price'
DDB-->>L: price widgets list (paginated)
L->>L: Collect unique product_ids
Note over L,K: Bulk fetch prices in ONE request
L->>K: GET /k/v1/records.json
app=79, query: 商品ID in ("id1","id2",...)
K-->>L: records (prices)
loop For each price widget
L->>DDB: UpdateItem Key(id, type='price')
sequenceDiagram
participant EB as EventBridge Rule<br/>(rate(1 hour))
participant L as PriceUpdateLambda<br/>(app/lambda_handlers/price_update_handler.py)
participant DDB as DynamoDB<br/>({env}_widget_setting)
participant K as Kintone API<br/>(External, App 79)
participant CW as CloudWatch Logs
EB->>L: Invoke Lambda (scheduled)
L->>CW: "Starting hourly price update process (EventBridge)"
L->>L: process_pending_jobs()
L->>L: WidgetSettingRepository.update_price_widgets_bulk()
Note over L,DDB: Scan all widgets type='price'<br/>to collect unique product_ids
L->>DDB: Scan widget_setting<br/>FilterExpression: type='price'
DDB-->>L: price widgets list (paginated)
L->>L: Collect unique product_ids
Note over L,K: Bulk fetch prices in ONE request
L->>K: GET /k/v1/records.json<br/>app=79, query: 商品ID in ("id1","id2",...)
K-->>L: records (prices)
loop For each price widget
L->>DDB: UpdateItem Key(id, type='price')<br/>SET settings = merged_price_settings, updated_at = now
DDB-->>L: OK
end
L->>CW: "[price_update_bulk] Found X price widgets to process"
L->>CW: "[price_update_bulk] Unique product_ids: Y"
L->>CW: "Hourly price update process completed successfully"
L-->>EB: Return 200