스케줄 작업 완료 .
This commit is contained in:
1 parent
6fba9c5362
commit
41087b5fda
4 files changed
+72
-22
No files matched your search
@@ -17,14 +17,6 @@ logger = logging.getLogger(__name__)
|
||||
router = APIRouter(prefix="/internal/social", tags=["Internal"])
|
||||
|
||||
|
||||
def _verify_secret(x_internal_secret: str = Header(...)) -> None:
|
||||
if x_internal_secret != internal_settings.INTERNAL_SECRET_KEY:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="Invalid internal secret",
|
||||
)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/upload/{upload_id}",
|
||||
summary="[내부] 예약 업로드 실행",
|
||||
@@ -35,7 +27,11 @@ async def trigger_scheduled_upload(
|
||||
background_tasks: BackgroundTasks,
|
||||
x_internal_secret: str = Header(...),
|
||||
) -> dict:
|
||||
_verify_secret(x_internal_secret)
|
||||
if x_internal_secret != internal_settings.INTERNAL_SECRET_KEY:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="Invalid internal secret",
|
||||
)
|
||||
|
||||
logger.info(f"[INTERNAL] 예약 업로드 실행 - upload_id: {upload_id}")
|
||||
background_tasks.add_task(process_social_upload, upload_id)
|
||||
|
||||
Reference in new issue
Block a user