Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip transmission for transmit_data_oclc_api_task when env is not production #1054

Open
shelleydoljack opened this issue Jun 4, 2024 · 0 comments
Labels
data export Related to Data Export out of FOLIO to external vendors

Comments

@shelleydoljack
Copy link
Contributor

Blocked by #988

For the transmit_data_oclc_api_task, we're not calling the return_success_test_instance when the env is not production.

def transmit_data_oclc_api_task(connection_details, libraries) -> dict:
success, failures = {}, {}
connection_lookup = oclc_connections(connection_details)
for library, records in libraries.items():
oclc_api = OCLCAPIWrapper(
client_id=connection_lookup[library]["username"],
secret=connection_lookup[library]["password"],
)
if len(records.get("new", [])) > 0:
new_result = oclc_api.new(records['new'])
success[library] = new_result['success']
failures[library] = new_result['failures']
if len(records.get("update", [])) > 0:
updated_result = oclc_api.update(records['update'])
success[library].extend(updated_result['success'])
failures[library].extend(updated_result['failures'])
return {"success": success, "failures": failures}

We should add that once we have completed #988

@shelleydoljack shelleydoljack added the data export Related to Data Export out of FOLIO to external vendors label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data export Related to Data Export out of FOLIO to external vendors
Projects
None yet
Development

No branches or pull requests

1 participant