AsyncIndex | Schedule Reindex from Backend | Cron Utils library
kandi X-RAY | AsyncIndex Summary
kandi X-RAY | AsyncIndex Summary
AsyncIndex
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Index unprocessed events
- Execute a partial index
- Run indexer
- Try to schedule index
- Generate option array
- Run partial index
- Get all pending events
- Get process code from request
AsyncIndex Key Features
AsyncIndex Examples and Code Snippets
Community Discussions
Trending Discussions on AsyncIndex
QUESTION
I am confused between the usage of Action
and Action.async
. And what is the appropriate condition to use one.
I have wrote the method with Action.async
with just a for loop, which takes 12 secs to process:
ANSWER
Answered 2018-Jan-23 at 14:55I am confused in Action and Action.async and what is the appropriate condition to use one
From the documentation:
Note: Both
Action.apply
andAction.async
createAction
objects that are handled internally in the same way. There is a single kind ofAction
, which is asynchronous, and not two kinds (a synchronous one and an asynchronous one). The.async
builder is just a facility to simplify creating actions based on APIs that return aFuture
, which makes it easier to write non-blocking code.
when i simultaneously make two request to this method the second request is blocked until the first one is completed
Also from the documentation:
The web client will be blocked while waiting for the response, but nothing will be blocked on the server, and server resources can be used to serve other clients.
If your simultaneous requests are from the same synchronous client, one of the requests on the client side will be blocked until the other is completed. There is no blocking on the server side. To achieve parallel processing of requests to the same endpoint, use distinct clients to make those requests, or use a client that makes asynchronous HTTP calls. Also consider using a separate dispatcher for this endpoint, even if you're wrapping the processing inside a Future
(more information on creating a custom dispatcher is in the linked documentation).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AsyncIndex
Clear the cache, logout from the admin panel and then login again.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page