Skip to content

Conversation

@gvanrossum-ms
Copy link
Collaborator

@gvanrossum-ms gvanrossum-ms commented Jan 14, 2026

This changes the schema for IngestedSources, adding a text column 'status' that can describe whether indexing of a source_id succeeded, failed, or resulted in some other status. Well-known values are 'ingested', 'failed', but using mark_source_ingested() it can be set to any other string value, and the status can be retrieved using get_source_status(). The existing is_source_ingested() returns True only if the status field has the exact value 'ingested'.

The behavior of add_messages_with_indexing() changes subtly: it now sets the status to 'failed' before attempting any work; it sets it to 'ingested' once it is done indexing.

To alter a precious existing database, do this using sqlite3:

ALTER TABLE IngestedSources
ADD COLUMN status TEXT NOT NULL DEFAULT 'ingested';

That sets the status for every row present to 'ingested', matching the original behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants