rs_workflows/on_demand_processing.md¶
Prefect flows and tasks for on-demand processing
build_and_generate_payload(logger, flow_env, task_table, dpr_input, retry_config)
¶
Build and generate the payload file and the lineage source items
Source code in docs/rs-client-libraries/rs_workflows/on_demand_processing.py
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | |
build_dask_dashboard_url_message(cluster_instance)
¶
Build the Dask dashboard log message from the configured public gateway endpoint.
Source code in docs/rs-client-libraries/rs_workflows/on_demand_processing.py
dpr_processing(dpr_input, retry_config=RetryConfig())
async
¶
Prefect flow for dpr-process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dpr_input
|
DprProcessIn
|
Input parameters for executing this flow |
required |
retry_config
|
RetryConfig
|
Staging retry config |
RetryConfig()
|
Source code in docs/rs-client-libraries/rs_workflows/on_demand_processing.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | |
process_input_adfs(input_adfs, dpr_input, task_table, specific_input_product=(None, None), staging_retries=3, staging_retry_delay=60)
async
¶
Stage the ADFS inputs described in the task table for one processing unit input.
The task iterates through the ordered alternatives defined for a given ADFS input and stops at the first alternative that produces staged items.
For each alternative, the task: - builds the final AUX CQL2 request from the task table definition - resolves the target AUX collection identifier - runs AUX staging with retries - normalizes archived outputs when the staged assets still point to compressed archives - updates the catalog entries after normalization so downstream payload generation sees the final asset hrefs
Returns:
| Type | Description |
|---|---|
tuple[str, str, tuple[bool, ItemCollection]] | None
|
tuple[str, str, tuple[bool, ItemCollection]]: The input ADFS name and type together with the original staging status/item collection tuple shape expected by downstream code, or None if no alternative returned staged data for a non-mandatory ADFS. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no alternative returns staged data for a mandatory ADFS, or if the task table content cannot be read as expected. |
Source code in docs/rs-client-libraries/rs_workflows/on_demand_processing.py
render_aux_cql2(alternative, task_table, specific_input_product=(None, None))
¶
Render the STAC/CQL2 request of one ADFS alternative from the task table queries.
Placeholders such as {input_name.property} are resolved from the properties of the
STAC item of the specific input product (ADFS multiplicity 'one_per_input').
Returns:
| Type | Description |
|---|---|
tuple[dict, dict[str, Any]]
|
tuple[dict, dict]: the rendered STAC/CQL2 request and the resolved query parameters. |
Source code in docs/rs-client-libraries/rs_workflows/on_demand_processing.py
resolve_specific_input_product_stac_items(input_adfs, task_table, unit, provided_input_products, rs_client)
¶
Resolve the STAC items of the input products an ADFS depends on, for the ADFS multiplicity 'one_per_input'.
Returns:
| Type | Description |
|---|---|
tuple[str, list[Item]] | tuple[None, list[None]]
|
The name of the referenced input product and the STAC items of the provided input products matching |
tuple[str, list[Item]] | tuple[None, list[None]]
|
its regex. If the ADFS multiplicity is not 'one_per_input', (None, [None]) is returned so the ADFS |
tuple[str, list[Item]] | tuple[None, list[None]]
|
is staged once. |
Source code in docs/rs-client-libraries/rs_workflows/on_demand_processing.py
select_aux_collection_and_source(dpr_input, product_type)
¶
Resolve the catalog collection identifier and STAC source for a requested AUX product type.
The selection logic mirrors the previous inline implementation used by
process_input_adfs:
- prefer the collection explicitly mapped to the requested product_type
- otherwise fall back to the wildcard mapping (*) when present
- otherwise derive the default convention-based collection name from the
satellite and product type
Keeping this lookup in a dedicated helper makes the fallback chain easier to read and test independently from the staging flow logic.