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

Run in background #162

Open
thegabriele97 opened this issue Apr 24, 2024 · 2 comments
Open

Run in background #162

thegabriele97 opened this issue Apr 24, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@thegabriele97
Copy link

Hello!
I am trying to implement a media conversion script that may last for many minutes. Is there a way to execute the script in background? So that the user receive a notification when it is done.

Thank you

@Raudius
Copy link
Owner

Raudius commented Apr 25, 2024

Its not directly implemented but you may be able to achieve something similar by configuring the media conversion script to run via Flow.

You would need to create a separate script to trigger the flow, the easiest way would be by adding a tag to the file. Of course this only works for simple scripts that dont have any other user inputs.

This was a planned feature early on (#7) but its not trivial to develop.

Would need to implement a job queue as well as a way to report results and handle execution errors. There are also other challenges to consider such as limiting the amount of background actions a user can perform and handling idempotency (triggering the same action multiple times before execution is finished).

@Raudius Raudius added the enhancement New feature or request label Apr 25, 2024
@Raudius
Copy link
Owner

Raudius commented Apr 25, 2024

Of course this only works for simple scripts that dont have any other user inputs.

You could also forward the inputs payload to the flow script by adding them as a comment to the file. (comment_create, comments_find).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants