-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3285 from danswer-ai/hotfix/v0.15-manual-indexing
Merge hotfix/v0.15-manual-indexing into release/v0.15
- Loading branch information
Showing
9 changed files
with
173 additions
and
52 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
backend/alembic/versions/93560ba1b118_add_web_ui_option_to_slack_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""add web ui option to slack config | ||
Revision ID: 93560ba1b118 | ||
Revises: 6d562f86c78b | ||
Create Date: 2024-11-24 06:36:17.490612 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "93560ba1b118" | ||
down_revision = "6d562f86c78b" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# Add show_continue_in_web_ui with default False to all existing channel_configs | ||
op.execute( | ||
""" | ||
UPDATE slack_channel_config | ||
SET channel_config = channel_config || '{"show_continue_in_web_ui": false}'::jsonb | ||
WHERE NOT channel_config ? 'show_continue_in_web_ui' | ||
""" | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
# Remove show_continue_in_web_ui from all channel_configs | ||
op.execute( | ||
""" | ||
UPDATE slack_channel_config | ||
SET channel_config = channel_config - 'show_continue_in_web_ui' | ||
""" | ||
) |
30 changes: 30 additions & 0 deletions
30
backend/alembic/versions/abe7378b8217_add_indexing_trigger_to_cc_pair.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""add indexing trigger to cc_pair | ||
Revision ID: abe7378b8217 | ||
Revises: 6d562f86c78b | ||
Create Date: 2024-11-26 19:09:53.481171 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "abe7378b8217" | ||
down_revision = "93560ba1b118" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column( | ||
"connector_credential_pair", | ||
sa.Column( | ||
"indexing_trigger", | ||
sa.Enum("UPDATE", "REINDEX", name="indexingmode", native_enum=False), | ||
nullable=True, | ||
), | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("connector_credential_pair", "indexing_trigger") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
"""Factory stub for running celery worker / celery beat.""" | ||
from celery import Celery | ||
|
||
from danswer.background.celery.apps.beat import celery_app | ||
from danswer.utils.variable_functionality import set_is_ee_based_on_env_variable | ||
|
||
set_is_ee_based_on_env_variable() | ||
app = celery_app | ||
app: Celery = celery_app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
"""Factory stub for running celery worker / celery beat.""" | ||
from celery import Celery | ||
|
||
from danswer.utils.variable_functionality import fetch_versioned_implementation | ||
from danswer.utils.variable_functionality import set_is_ee_based_on_env_variable | ||
|
||
set_is_ee_based_on_env_variable() | ||
app = fetch_versioned_implementation( | ||
app: Celery = fetch_versioned_implementation( | ||
"danswer.background.celery.apps.primary", "celery_app" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.