Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
create-ticket: fix request
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul committed Aug 6, 2024
1 parent 9f685ba commit 0d0825e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions workflows/dags/author/author_create/author_create_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ def create_author_create_user_ticket(**context: dict) -> None:
"description": "test",
"caller_email": "", # leave empty
}
logger.info("wow")
logger.info(request_data)
response = inspire_http_hook.call_api(
endpoint=endpoint, data=request_data, method="POST"
)
Expand Down
3 changes: 2 additions & 1 deletion workflows/plugins/hooks/inspirehep/inspire_http_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def tenacity_retry_kwargs(self) -> dict:
def headers(self) -> dict:
return {
"Authorization": f'Bearer {Variable.get("inspire_token")}',
"Accept": "application/vnd+inspire.record.raw+json",
}

def run(
Expand Down Expand Up @@ -55,6 +54,8 @@ def run(
return self.run_and_check(session, prepped_request, extra_options)

def call_api(self, method: str, endpoint: str, data: dict) -> Response:
self.log.info("HEADERS ARE")
self.log.info(str(self.headers))
return self.run_with_advanced_retry(
_retry_args=self.tenacity_retry_kwargs,
endpoint=endpoint,
Expand Down

0 comments on commit 0d0825e

Please sign in to comment.