Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,20 @@ jobs:
envsubst '${DOMAIN}' < nginx/nginx.conf.template > nginx/nginx.conf
[ -f nginx/nginx.conf ] && [ -s nginx/nginx.conf ] || { echo "❌ Failed to create nginx.conf"; exit 1; }

docker pull ${DOCKER_USER}/retoday-api:${SHA} || true
docker pull ${DOCKER_USER}/retoday-api:${SHA}
docker tag ${DOCKER_USER}/retoday-api:${SHA} retoday-api:latest
COMPOSE_PROFILES=dev docker compose up -d --force-recreate api

docker compose up -d --force-recreate nginx
sleep 3

HEALTH_OK=false
for i in {1..10}; do
for i in {1..20}; do
if curl -sf http://localhost/actuator/health | grep -q '"status":"UP"'; then
HEALTH_OK=true
break
fi
sleep 2
sleep 3
done

if [ "$HEALTH_OK" != "true" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,22 @@ interface HistoryRepository : JpaRepository<History, Long> {

@Query(
"""
SELECT
p.title AS title,
p.description AS description,
wc.name AS categoryName,
h.visited_at AS visitedAt,
h.closed_at AS closedAt
FROM history h
JOIN page p ON p.id = h.page_id
JOIN website w ON w.id = h.website_id
LEFT JOIN website_category wc ON wc.id = w.category_id
WHERE h.user_id = :userId
AND h.visited_at >= :startedAt
AND h.visited_at < :endedAt
ORDER BY h.visited_at
""",
nativeQuery = true
SELECT new com.retoday.core.domain.recap.dto.projection.UserTimelineProjection(
p.title,
p.description,
wc.name,
h.visitedAt,
h.closedAt
)
FROM History h
JOIN Page p ON p.id = h.pageId
JOIN Website w ON w.id = h.websiteId
LEFT JOIN WebsiteCategory wc ON wc.id = w.categoryId
WHERE h.userId = :userId
AND h.visitedAt >= :startedAt
AND h.visitedAt < :endedAt
ORDER BY h.visitedAt
"""
)
fun findUserTimelinesForRecap(
@Param("userId")
Expand Down