Add: redemtion id

This commit is contained in:
dx-tan 2024-01-11 17:38:12 +07:00
parent cecee15cd6
commit d6bccec51d
3 changed files with 15 additions and 14 deletions

View File

@ -151,7 +151,8 @@ class CtelViewSet(viewsets.ViewSet):
pages_left=total_page, pages_left=total_page,
process_type=p_type, status=1, request_id=rq_id, process_type=p_type, status=1, request_id=rq_id,
provider_code=provider_code, provider_code=provider_code,
subscription=sub) subscription=sub,
redemption_id=validated_data["redemption_ID"])
new_request.save() new_request.save()
count = 0 count = 0
compact_files = [] compact_files = []

View File

@ -10,7 +10,7 @@ class SubscriptionRequest(models.Model):
pages_left: int = models.IntegerField(default=1) pages_left: int = models.IntegerField(default=1)
doc_type: str = models.CharField(max_length=100) doc_type: str = models.CharField(max_length=100)
request_id = models.CharField(max_length=200) # Change to request_id request_id = models.CharField(max_length=200) # Change to request_id
redemption_id = models.CharField(max_length=200, null=True) # Change to request_id redemption_id = models.CharField(max_length=200, null=True)
process_type = models.CharField(max_length=200) # driver/id/invoice process_type = models.CharField(max_length=200) # driver/id/invoice
provider_code = models.CharField(max_length=200, default="Guest") # Request source FWD/CTel provider_code = models.CharField(max_length=200, default="Guest") # Request source FWD/CTel
predict_result = models.JSONField(null=True) predict_result = models.JSONField(null=True)

View File

@ -11,24 +11,24 @@ echo "[INFO] Tag received from Python: $tag"
echo "[INFO] Pushing AI image with tag: $tag..." echo "[INFO] Pushing AI image with tag: $tag..."
docker compose -f docker-compose-dev.yml build cope2n-fi-sbt docker compose -f docker-compose-dev.yml build cope2n-fi-sbt
docker tag sidp/cope2n-ai-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:${tag} docker tag sidp/cope2n-ai-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:${tag}
docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:${tag} docker push public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:${tag}
# docker tag sidp/cope2n-ai-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:production # docker tag sidp/cope2n-ai-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:production
# docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:production # docker push public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:production
echo "[INFO] Pushing BE image with tag: $tag..." echo "[INFO] Pushing BE image with tag: $tag..."
docker compose -f docker-compose-dev.yml build be-ctel-sbt docker compose -f docker-compose-dev.yml build be-ctel-sbt
docker tag sidp/cope2n-be-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:${tag} docker tag sidp/cope2n-be-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:${tag}
# docker tag sidp/cope2n-be-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:production # docker tag sidp/cope2n-be-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:production
docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:${tag} docker push public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:${tag}
# docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:production # docker push public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:production
echo "[INFO] Pushing FE image with tag: $tag..." echo "[INFO] Pushing FE image with tag: $tag..."
docker compose -f docker-compose-dev.yml build fe-sbt docker compose -f docker-compose-dev.yml build fe-sbt
docker tag sidp/cope2n-fe-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:${tag} docker tag sidp/cope2n-fe-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:${tag}
# docker tag sidp/cope2n-fe-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:production # docker tag sidp/cope2n-fe-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:production
docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:${tag} docker push public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:${tag}
# docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:production # docker push public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:production
cp ./docker-compose-prod.yml ./docker-compose_${tag}.yml cp ./docker-compose-prod.yml ./docker-compose_${tag}.yml
sed -i "s/{{tag}}/$tag/g" ./docker-compose_${tag}.yml sed -i "s/{{tag}}/$tag/g" ./docker-compose_${tag}.yml