-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #371 from biocore/daklapack_celery_polling
Daklapack celery polling and emailing, plus archiving errored orders with Daklapack
- Loading branch information
Showing
9 changed files
with
147 additions
and
20 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
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
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
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 |
---|---|---|
|
@@ -22,5 +22,6 @@ | |
"daklapack_subscription_key_name": "dak-specific-key", | ||
"daklapack_subscription_key_val": "123abc456d89z", | ||
"daklapack_api_base_url": "https://example.com/dak_api", | ||
"daklapack_service_email": "[email protected]" | ||
"daklapack_service_email": "[email protected]", | ||
"daklapack_errors_report_email": "[email protected]" | ||
} |
35 changes: 35 additions & 0 deletions
35
microsetta_private_api/templates/email/daklapack_order_errors_report.jinja2
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,35 @@ | ||
<html> | ||
<head> | ||
<meta content="text/html; charset=UTF-8" http-equiv="content-type"> | ||
</head> | ||
<body> | ||
<p> | ||
Daklapack reports that the following orders have an error in their system and cannot be fulfilled. | ||
Please identify and correct these errors and then submit replacement Daklapack orders. | ||
</p> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Order ID</th> | ||
<th>Article Code</th> | ||
<th>Sent-To Address</th> | ||
<th>Order Submitter</th> | ||
<th>Creation Date</th> | ||
<th>Status Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for curr_error in errors %} | ||
<tr> | ||
<td>{{ curr_error['order_id'] }}</td> | ||
<td>{{ curr_error['article_code'] }}</td> | ||
<td>{{ curr_error['sent_to_address'] }}</td> | ||
<td>{{ curr_error['order_submitter'] }}</td> | ||
<td>{{ curr_error['creation_date'] }}</td> | ||
<td>{{ curr_error['status_description'] }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</body> | ||
</html> |
16 changes: 16 additions & 0 deletions
16
microsetta_private_api/templates/email/daklapack_polling_errors_report.jinja2
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,16 @@ | ||
<html> | ||
<head> | ||
<meta content="text/html; charset=UTF-8" http-equiv="content-type"> | ||
</head> | ||
<body> | ||
<p> | ||
The Daklapack order status polling code encountered the following exceptions. | ||
Please alert the development team. | ||
</p> | ||
|
||
{% for curr_error in errors %} | ||
<p>{{ curr_error }}</p> | ||
{% endfor %} | ||
|
||
</body> | ||
</html> |