Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8123e26
fix process_response argument
avirajsingh7 Sep 12, 2025
073a61c
Refactor process_response to use get_openai_client for OpenAI API cli…
avirajsingh7 Sep 12, 2025
a757f29
Refactor response api:
avirajsingh7 Sep 17, 2025
824652e
move response code to service
avirajsingh7 Sep 17, 2025
b471c3e
Implement job management and integrate it with response processing
avirajsingh7 Sep 18, 2025
580c3f5
pass trace id to job table
avirajsingh7 Sep 18, 2025
0de7cd0
pre commit and pass trace id to celery
avirajsingh7 Sep 18, 2025
19928ab
add task id to response log
avirajsingh7 Sep 18, 2025
b1e8fb4
Refactor response handling: split response logic into separate modules
avirajsingh7 Sep 22, 2025
3d9b2fa
Refactor callback handling: move send_callback function to utils and …
avirajsingh7 Sep 22, 2025
b962760
Add ResponseJobStatus model and update responses endpoint to return s…
avirajsingh7 Sep 22, 2025
7764568
fix init
avirajsingh7 Sep 22, 2025
a569485
Add tests for JobCrud and response job handling
avirajsingh7 Sep 22, 2025
87ecdb6
update Job model to use string for task_id
avirajsingh7 Sep 22, 2025
96160c6
Add tests for response generation and processing, including success a…
avirajsingh7 Sep 22, 2025
f150372
pre commit
avirajsingh7 Sep 23, 2025
e7fe68d
rename test_jobs
avirajsingh7 Sep 23, 2025
bc40a18
Add flower dependency to pyproject.toml and uv.lock
avirajsingh7 Sep 24, 2025
f3f1565
Refactor job table migration and enhance error handling in job schedu…
avirajsingh7 Sep 24, 2025
7504ef7
Add CALLBACK_TIMEOUT setting and update send_callback to use it
avirajsingh7 Sep 24, 2025
1268dfb
Add callback timeout settings and update send_callback function to us…
avirajsingh7 Sep 24, 2025
65380f8
Remove unused response_chunks in CallbackResponse and update related …
avirajsingh7 Sep 25, 2025
db0c276
Fix update_job test to assert failure status and correct error message
avirajsingh7 Sep 25, 2025
6fe72d6
Refactor get_additional_data function to simplify exclusion logic for…
avirajsingh7 Sep 25, 2025
eaf8202
Update job_type field description for clarity and consistency
avirajsingh7 Sep 25, 2025
fcbd764
Remove unused imports and add conditional previous_response_id in gen…
avirajsingh7 Sep 25, 2025
898f034
Merge branch 'main' into feature/response_api_to_celery
avirajsingh7 Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,8 @@ CELERY_WORKER_PREFETCH_MULTIPLIER=1
CELERY_ENABLE_UTC=true
# India Standard Time (UTC+05:30)
CELERY_TIMEZONE=Asia/Kolkata


# Callback Timeouts (in seconds)
CALLBACK_CONNECT_TIMEOUT = 3
CALLBACK_READ_TIMEOUT = 10
4 changes: 4 additions & 0 deletions .env.test.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ AWS_ACCESS_KEY_ID=this_is_a_test_key
AWS_SECRET_ACCESS_KEY=this_is_a_test_key
AWS_DEFAULT_REGION=ap-south-1
AWS_S3_BUCKET_PREFIX="bucket-prefix-name"

# Callback Timeouts (in seconds)
CALLBACK_CONNECT_TIMEOUT = 3
CALLBACK_READ_TIMEOUT = 10
44 changes: 44 additions & 0 deletions backend/app/alembic/versions/c6fb6d0b5897_create_job_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""create job table

Revision ID: c6fb6d0b5897
Revises: 6ed6ed401847
Create Date: 2025-09-22 17:55:57.558157

"""
from alembic import op
import sqlalchemy as sa
import sqlmodel.sql.sqltypes


# revision identifiers, used by Alembic.
revision = "c6fb6d0b5897"
down_revision = "6ed6ed401847"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"job",
sa.Column("id", sa.Uuid(), nullable=False),
sa.Column("task_id", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
sa.Column("trace_id", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
sa.Column("error_message", sqlmodel.sql.sqltypes.AutoString(), nullable=True),
sa.Column(
"status",
sa.Enum("PENDING", "PROCESSING", "SUCCESS", "FAILED", name="jobstatus"),
nullable=False,
),
sa.Column("job_type", sa.Enum("RESPONSE", name="jobtype"), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.Column("updated_at", sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint("id"),
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table("job")
# ### end Alembic commands ###
Loading