Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Fixed issues with incremental indexer command #561
base: master
Are you sure you want to change the base?
🐛 Fixed issues with incremental indexer command #561
Changes from 1 commit
12d3189
e213318
5e0d0fd
a318f24
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 33 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L33
Check warning on line 36 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L35-L36
Check warning on line 38 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L38
Check warning on line 40 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we
return 1
and use$log->fail()
instead?https://laravel.com/docs/11.x/artisan#exit-codes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of us are wrong. https://tldp.org/LDP/abs/html/exitcodes.html
This should be
128 + {the signal received}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal is to let the parent process know which signal terminated the process.
E.g. in PHPStorm when I stop the run:
Check warning on line 42 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L42
Check warning on line 46 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L45-L46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pushrbx Is this hack specific to docker containers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, would it make sense to move this to helpers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to have a sleep function which can be cancelled. Anytime you cancel the process, it should gracefully exit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll move this to helpers.
Check warning on line 111 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L111
Check warning on line 124 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L124
Check warning on line 140 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L140
Check warning on line 144 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L144
Check warning on line 164 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L164
Check warning on line 169 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L168-L169
Check warning on line 172 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L171-L172
Check warning on line 201 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L200-L201
Check warning on line 205 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L204-L205
Check warning on line 208 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L207-L208
Check warning on line 212 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L212
Check warning on line 223 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L223
Check warning on line 247 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L246-L247
Check warning on line 253 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L253
Check warning on line 257 in app/Console/Commands/Indexer/IncrementalIndexer.php
Codecov / codecov/patch
app/Console/Commands/Indexer/IncrementalIndexer.php#L257
Check warning on line 104 in app/Providers/AppServiceProvider.php
Codecov / codecov/patch
app/Providers/AppServiceProvider.php#L102-L104