IQEngine icon indicating copy to clipboard operation
IQEngine copied to clipboard

[WIP] Async to Sync plugin proxy

Open loic-fejoz opened this issue 1 year ago • 3 comments

While IQEngine is transitioning from Sync plugins to Async one, this pull-request propose a plugin that bridge the gap for existing plugin. It has been tested on https://staging.iqengine.org with my current sync plugin in rust as of 2024-05-29.

This plugin can proxy only function at a time. The url of the proxied sync plugin is configured by the environment variable IQENGINE_PROXY_URL.

For instance, if your userdef sync function plugin is served on port 9000, you will have to:

  1. checkout code repository, cd into ./plugins/src/
  2. launch the following command: IQENGINE_PROXY_URL=http://127.0.0.1:9000/plugins/userdef uvicorn --host 0.0.0.0 --port 8000 plugins_ap

loic-fejoz avatar May 29 '24 11:05 loic-fejoz

FYI I just deployed the latest main to prod (iqengine.org) so now both staging and prod are on the async

777arc avatar May 30 '24 20:05 777arc

This was a great solution!

777arc avatar May 30 '24 20:05 777arc

Thanks @777arc . I thus need to hurry up to transition to my plugin too!

loic-fejoz avatar May 31 '24 18:05 loic-fejoz