• mathishuettl

    (@mathishuettl)


    Hello,

    I have a few API endpoints in my WordPress page. The problem is, that the response-time takes about (6 – 30 seconds – depends on what is to do).

    When a client sends a request to my api he have to wait 6 – 30 seconds for a response and that is the problem.

    I red about background dispatch – how does this work with wordpress? The only thing the API does is insert, delete or update posts.

    At the moment the API does the following:
    1. Validate data
    2. Check if the client_id exists and the client_secret matches
    3. Check if the post already exists -> if yes update -> if no create
    4. Update / Create post
    5. (optional) Upload images with media_sideload_image()
    5/6. Update custom fields -> update_field()

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress API task in Background’ is closed to new replies.