Deployment and Upgrade for Minor Metal Yield Data

Minor metal market and yield data comes from domestic nonferrous metal industry professional information platforms, public market APIs from futures

What this category of data looks like

Minor metal market and yield data comes from domestic nonferrous metal industry professional information platforms, public market APIs from futures exchanges, and statistical data from industry associations. There are two update schedules: spot market data updates once every hour, and daily yield summary reports are fully generated after 16:30 on each trading day. Each data document uses a structured format, including fields such as variety_id, variety_name, base_price, current_price, price_movement, update_timestamp. base_price refers to the settlement price of the base date, current_price refers to the day's settlement price, price_movement refers to the relative price change from the base, update_timestamp is the Unix timestamp of data collection. All numeric fields use the standard pricing units for the minor metal industry.

What constraints do these characteristics impose on deployment and upgrade

Multi-source access and layered update schedules for minor metal data create multiple constraints for deployment and upgrade. Connect multiple heterogeneous data source APIs. During deployment, configure data source parameters with different authentication methods, and reserve interface extension entries to adapt to new industry information data sources. Layered update schedules require configuring differentiated scheduled scheduling tasks during deployment. Trigger spot data collection every hour, and set daily yield reports to run full calculations after 16:30 on trading days. During upgrade, ensure the time offset of scheduling tasks can be adjusted flexibly to avoid interfering with data update windows. Single data fields may be adjusted slightly with variety iterations. During deployment, configure editable field mapping rules, so that new fields can be adapted without refactoring core code during upgrade. High-frequency spot data collection requires configuring reasonable request rate limits to prevent triggering rate limiting rules of data source APIs.

How to set the configurations

Configuration ItemRecommended SettingRationale
CRON_JOB_HOURLY0 * * * *Matches the hourly update cadence of minor metal spot market data to ensure data timeliness
CRON_JOB_DAILY30 17 * * 1-5Adapts to the daily report generation window after 16:30 on trading days, set to run full calculations at 17:30 on weekdays
VECTOR_DB_COMPAT_VERSIONpgvector 0.7.4Meets vector storage requirements for PostgreSQL 15 and above, compatible with dependency versions of official deployment images
DOCKER_BUILD_PLATFORMSelect based on deployment node architecture, such as linux/amd64 or linux/arm64Prevents cross-architecture images from failing to run, ensures containers start normally on the target node
DATA_REQUEST_TIMEOUT600 secondsCovers the maximum time required for multi-source data collection, prevents collection interruptions caused by network fluctuations
MAX_DATA_RETRY3 retriesAddresses temporary rate limiting or network fluctuations of data source APIs, reduces data collection failure rates

The parameter values provided on this page are general recommendations to serve as a starting point for configuration. Actual values are affected by material form, data volume, and business rules. Specific issues require case-by-case analysis. It is recommended to test on your own samples before finalizing settings.

Three common mistakes

  • When migrating an image built on an arm architecture node to an amd architecture node, a container startup failure error occurs. The cause is that the platform parameter matching the deployment node was not specified during build, resulting in a mismatch between the image architecture and the runtime environment.
  • A version compatibility error occurs when starting the vector database service, or the vector retrieval function returns abnormal results. The cause is using a pgvector version that does not match the PostgreSQL version, such as using an incompatible higher version of pgvector in a PG15 environment.
  • When deploying locally and executing a data collection task, a badresponsestatus_code error occurs, or pulling the official image fails when deploying with Docker Compose. The cause is not configuring a domestic image acceleration source to adapt to the network environment, or not setting a reasonable request retry mechanism to address temporary API fluctuations.

How to confirm the configuration is complete

  • Run the container status check command to confirm all deployed service containers are in normal running state.
  • Log in to the vector database management interface to verify that the installed version of the pgvector extension matches the configured compatible version.
  • Manually trigger a data collection task and check that the collected minor metal data fields match the preset mapping rules.
  • View the scheduled task execution logs to confirm that all scheduling tasks trigger normally according to the configured time rules.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-14.