Skip to content

Commit

Permalink
[FIX] - local tuple syntax (#3297)
Browse files Browse the repository at this point in the history
* data typing issues and clean up

* better logging

* better logging of errors

* list of tuples

* add celery decorator

* rename var to match envvar
  • Loading branch information
Jsyro authored Nov 7, 2024
1 parent 31213ee commit 98e189e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/core-api/app/api/verifiable_credentials/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,12 @@ def process_all_untp_map_for_orgbook():
return [record for payload, record in records]


@celery.task()
def forward_all_pending_untp_vc_to_orgbook():
"""STUB for celery job to publis all pending vc to orgbook."""
## CORE signs and structures the credential, the publisher just validates and forwards it.
records_to_forward = PermitAmendmentOrgBookPublish.find_all_unpublished(unsafe=True)
ORGBOOK_W3C_CRED_FORWARD = f"{Config.ORGBOOK_CREDENTIAL_BASE_URL}/forward"
ORGBOOK_W3C_CRED_FORWARD = f"{Config.ORGBOOK_PUBLISHER_BASE_URL}/credentials/forward"

task_logger.warning(f"going to publish {len(records_to_forward)} records to orgbook")

Expand Down Expand Up @@ -321,7 +322,7 @@ def push_untp_map_data_to_publisher():
)
else:
success_count += success_count + 1
failed_credentials.append(publish_record.unsigned_payload_hash, publish_record.error_msg)
failed_credentials.append((publish_record.unsigned_payload_hash, publish_record.error_msg))

return f"num published={success_count}, num failed = {len(failed_credentials)}"

Expand Down

0 comments on commit 98e189e

Please sign in to comment.