- Zapier Document Refresh action (create) added
This commit is contained in:
@@ -35,6 +35,7 @@ def ping():
|
||||
|
||||
@current_celery.task(name='create_embeddings', queue='embeddings')
|
||||
def create_embeddings(tenant_id, document_version_id):
|
||||
document_version = None
|
||||
try:
|
||||
# Retrieve Tenant for which we are processing
|
||||
tenant = Tenant.query.get(tenant_id)
|
||||
@@ -66,6 +67,8 @@ def create_embeddings(tenant_id, document_version_id):
|
||||
f'for badly configured document version {document_version_id} '
|
||||
f'for tenant {tenant_id}, '
|
||||
f'error: {e}')
|
||||
if document_version:
|
||||
document_version.processing_error = str(e)
|
||||
raise
|
||||
|
||||
# BusinessEvent creates a context, which is why we need to use it with a with block
|
||||
|
||||
Reference in New Issue
Block a user