Skip to content

Commit

Permalink
Add xml type to main registration function
Browse files Browse the repository at this point in the history
  • Loading branch information
kalxas committed May 30, 2023
1 parent ca3d645 commit cd1ba9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions workspace_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
REGISTER_JSON_QUEUE = os.environ.get(
"REDIS_REGISTER_JSON_QUEUE", "register_json_queue"
)
REGISTER_XML_QUEUE = os.environ.get(
"REDIS_REGISTER_XML_QUEUE", "register_xml_queue"
)
REGISTER_CATALOGUE_QUEUE = os.environ.get(
"REDIS_REGISTER_CATALOGUE_QUEUE", "register_catalogue_queue"
)
Expand Down
4 changes: 3 additions & 1 deletion workspace_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,15 @@ async def register(product: Product, workspace_name: str = workspace_path_type):
status_code=HTTPStatus.ACCEPTED, content={"message": message}
)

elif type_ in ("ades", "application", "oaproc", "catalogue"):
elif type_ in ("ades", "application", "oaproc", "catalogue", "xml"):
if type_ == "ades":
queue = config.REGISTER_ADES_QUEUE
elif type_ == "oaproc":
queue = config.REGISTER_ADES_QUEUE
elif type_ == "catalogue":
queue = config.REGISTER_CATALOGUE_QUEUE
elif type_ == "xml":
queue = config.REGISTER_XML_QUEUE
else:
queue = config.REGISTER_APPLICATION_QUEUE

Expand Down

0 comments on commit cd1ba9e

Please sign in to comment.