Skip to content
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

Control nexrender via API from Java Application #872

Closed
youzhajun opened this issue Mar 17, 2023 · 6 comments
Closed

Control nexrender via API from Java Application #872

youzhajun opened this issue Mar 17, 2023 · 6 comments

Comments

@youzhajun
Copy link

I want to invoke the nexsender API through a Java service. I want the nexsender server to call back to the Java server to tell me that the task was successful when the task status changes, rather than periodically requesting the task status query interface

"onChange": Function, "onRenderProgress": Function, "onRenderError": Function

Are these configurations used? How do I initiate an http request and carry the ID and task status through this?

@inlife inlife changed the title I want to invoke the nexsender API through a Java service. I want the nexsender server to call back to the Java server to tell me that the task was successful when the task status changes, rather than periodically requesting the task status query interface Control nexrender via API from Java Application Mar 17, 2023
@inlife
Copy link
Owner

inlife commented Mar 17, 2023

You can take a look at the HTTP API that nexrender-server offers:
https://github.com/inlife/nexrender/tree/master/packages/nexrender-server

And just in case, here is the visualization of how this network setup would look like:

(your case would be the Java App on the left bottom part of the image)

@youzhajun
Copy link
Author

youzhajun commented Mar 17, 2023

@inlife Yes, I have already called the server to create a task through the API. I want NexRender to notify Java when the task is completed, rather than constantly requesting NexSender to inquire about the task status.Which attribute should be used to configure and callback Java addresses and parameters?

@youzhajun
Copy link
Author

youzhajun commented Mar 17, 2023

Can you provide a simple example of letting nexRender request when the task is completed http://test.com/updateTaskStatus Interface and carry task id

@inlife
Copy link
Owner

inlife commented Mar 17, 2023

Well, by default, the is the expected behavior, and both nexrender-worker and nexrender-api packages also work the same way, they constantly POLL the API server for any updates on a regular basis.

If you want something more advanced, you could take a look into job actions, more specifically, I belive someone developed an action with Webhook. It could be used when you are creating a job on your Java side, to provide the URL which should be triggered when render finishes.

@youzhajun
Copy link
Author

youzhajun commented Mar 17, 2023

@inlife Thank you!Do you have any relevant information on this aspect. Because I feel that it is a waste of resources for the Java server to frequently request the nexrender server to create http links

@stale
Copy link

stale bot commented May 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 17, 2023
@stale stale bot closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants