v0.4.0
New Features
New production message: eps
Add a new production type message for GRAPES GEPS and GRAEPS REPS.
message body:
{
"app": "nwpc-message-client",
"type": "production",
"time": "2020-07-29T11:00:54.4846745+08:00",
"data": {
"system": "grapes_geps",
"stream": "eps",
"type": "grib2",
"name": "orig",
"start_time": "2020-03-05T00:00:00Z",
"forecast_time": "0h",
"number": 1,
"event": "storage",
"status": 0
}
}
message command:
nwpc_message_client production \
--system grapes_geps \
--production-stream eps \
--production-type grib2 \
--production-name orig \
--event storage \
--rabbitmq-server=${RABBITMQ_ADDRESS} \
--start-time 2020030500 \
--forecast-time 0h \
--number 1
New message: predict
Add a new message type predict
for prediction message created by nwpc-log-tool
project.
{
"app": "check_grapes_meso_3km",
"type": "predict.forecast_output",
"time": "2020-07-28T04:57:20.032583Z",
"data": {
"start_time": "2020-07-28T00:00:00",
"request": {
"forecast_time": "P0DT18H0M0S",
"valid_time": "2020-07-28T18:00:00"
},
"current": {
"forecast_time": "P0DT18H10M28S",
"valid_time": "2020-07-28T18:10:28",
"ctime": 36.504671666666745
},
"model": {
"type": "linear",
"coef": 113.23712658532165,
"intercept": 205.07699078383735
},
"predict": {
"total": {
"forecast_time": "P1DT12H0M0S",
"ctime": 71.36022579759029
}
},
"system": "grapes_meso_3km"
}
}
New command: send raw message
Add a new subcommand message
for raw message.
nwpc_message_client message \
--exchange-name="nwpc.operation.predict" \
--route-key-name="grapes_meso_3km.predict.forecast_output" \
--message-body="$(cat ${output_file_path})" \
--rabbitmq-server=${NWPC_MESSAGE_CLIENT_RABBITMQ_ADDRESS}
Improvements
Stop when messages in cache are too many
If messages in cache are more than 10 * consumer.BulkSize
, the consumer will throw an error.