-
Notifications
You must be signed in to change notification settings - Fork 4
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
Remove queue based on the condition #76
Merged
Merged
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
eb5395a
remove queue only if there is no error
ramyakrishnai 037af8e
linting fixes
ramyakrishnai 5ded7d6
Added retry limit to 3
ramyakrishnai 8ae7ca8
changes
ramyakrishnai 414f918
changes
ramyakrishnai 9ef95fc
linting fixes
ramyakrishnai 3731711
added delay of 15 sec to push to the queue again
ramyakrishnai 0143f62
added 5 sec
ramyakrishnai 63e5ac0
added retry
ramyakrishnai 8d080fe
linting issues
ramyakrishnai 7e861c8
Merge branch 'main' into removeQueue
BrianHenryIE 74a4130
Add tests for `EventMananager::init()`
BrianHenryIE c78de68
Add tests for `EventManager::init()`
BrianHenryIE 7b4562d
Delete rough-work test
BrianHenryIE 9849c34
Do not remove events from BatchQueue if sending them to Hiive fails
BrianHenryIE c786076
`EventManager::shutdown()` should `BatchQueue::push()` when fails to …
BrianHenryIE a420021
Correctly return `WP_Error` in test
BrianHenryIE cc90c94
lint / comment / typehint
BrianHenryIE c2f719c
Merge branch 'main' into removeQueue
BrianHenryIE b97add5
Use `assertConditionsMet` not `expectNotToPerformAssertions`
BrianHenryIE 4a23a7a
lint / use Mockery to skip some paths
BrianHenryIE b4d9523
Add `@hooked nfd_data_sync_cron` comment to `EventManager::send_batch()`
BrianHenryIE ccd5f1a
lint
BrianHenryIE eb13b46
Fix: `HiiveConnection::notify()` when `WP_Error` returned in request
BrianHenryIE f36013f
Do not preserve events after non-blocking requests
BrianHenryIE dd5fdaf
Add test for `HiiveConnection::notify()` non-blocking behavior
BrianHenryIE 1f037a3
Merge branch 'main' into removeQueue
BrianHenryIE c1071a5
Extract and test `Data::delete_token_on_401_response()`, hooked `http…
BrianHenryIE fb72ba7
Add `forceWpMockStrictModeOn()`/`forceWpMockStrictModeOff()`
BrianHenryIE b43d7e4
Saved queued events on failure
BrianHenryIE af2865b
Add `Hiive_Connection::hiive_request`, use `::notify` for v2 events, …
BrianHenryIE 233e71f
Update `newfold-data/v1/events` to expect notifications from `Hiive_C…
BrianHenryIE 5f79f55
Correct order of error message / code
BrianHenryIE f56b6f1
Remove duplicate line
BrianHenryIE f6e5274
Allow 200, 201 status codes
BrianHenryIE a193a43
Assert WP_Error is returned
BrianHenryIE 1f17404
lint / rename / type annotate
BrianHenryIE e180489
Use explicit HTTP 500 on error
BrianHenryIE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
@BrianHenryIE We'll want to return an explicit HTTP status code here. The WP_Error
get_error_code()
method isn't a status code. It would be something likeinvalid_rest_request
or some other string.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 think it will be appropriate to return 500 between the browser and the WP plugin. The browser doesn't really need to know about 401 etc.