-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Add new devices) Add pacbio order submitter (#3743) (patch)
### Added - Pacbio order submitter - Pacbio order submitter added to the registry
- Loading branch information
Showing
2 changed files
with
64 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from cg.models.orders.order import OrderIn | ||
from cg.services.orders.store_order_services.store_pacbio_order_service import ( | ||
StorePacBioOrderService, | ||
) | ||
from cg.services.orders.submitters.order_submitter import OrderSubmitter | ||
from cg.services.orders.validate_order_services.validate_pacbio_order import ( | ||
ValidatePacbioOrderService, | ||
) | ||
|
||
|
||
class PacbioOrderSubmitter(OrderSubmitter): | ||
"""Submitter for Pacbio orders.""" | ||
|
||
def __init__( | ||
self, | ||
order_validation_service: ValidatePacbioOrderService, | ||
order_store_service: StorePacBioOrderService, | ||
): | ||
self.order_validation_service = order_validation_service | ||
self.order_store_service = order_store_service | ||
|
||
def submit_order(self, order_in: OrderIn) -> dict: | ||
"""Submit a fastq order.""" | ||
self.order_validation_service.validate_order(order_in) | ||
result: dict = self.order_store_service.store_order(order_in) | ||
return result |