matchish / laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout
MIT License
702 stars 113 forks source link

[BUG] ProgressBar updates are posted to stderr #257

Open danielsimkus opened 1 year ago

danielsimkus commented 1 year ago

Describe the bug The progress bar for the import is outputting to stderr instead of stdout like the other logs on the ImportCommand

2023-08-22T08:09:25.860445803Z stdout F Importing [App\Models\Something]
2023-08-22T08:09:26.070524393Z stderr F
2023-08-22T08:09:26.070559394Z stderr F Clean up
2023-08-22T08:09:26.070568085Z stderr F   1/153 [➤⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬]   0%

To Reproduce Run an import

Expected behavior The progress bar should be info/stdout as default

hkulekci commented 11 months ago

This could be related to Stages somehow. I could not reproduce it on my local because of the shell. Could you give more detail related to how you are getting this response.

➜  laravel-scout-elasticsearch-example git:(main) ✗ php artisan scout:import
Importing [App\Models\Product]
Switching to the new index
5/5 [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬] 100%

 [OK] All [App\Models\Product] records have been imported.                                                              

Importing [App\Models\Attribute]
Switching to the new index
5/5 [⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬⚬] 100%

 [OK] All [App\Models\Attribute] records have been imported.