Skip to content

Commit

Permalink
refactor: elasticsearch import scout function
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Aug 2, 2024
1 parent 3af49e9 commit 88889e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions setup/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,10 @@ source_implement() {
"
fi
}

scout_import() {
docker compose run --rm -w /var/dev/blog-admin php83 ash -l -c "\
php artisan scout:import \
\"CSlant\Blog\Core\Models\User\" \
"
}
5 changes: 1 addition & 4 deletions setup/handlers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,5 @@ elasticsearch_import() {
cd "$CURRENT_DIR" || exit
echo "◎ Importing Elasticsearch data..."

docker compose run --rm -w /var/dev/blog-admin php83 ash -l -c "\
php artisan scout:import \
\"CSlant\Blog\Core\Models\User\" \
"
scout_import
}

0 comments on commit 88889e0

Please # to comment.