Use celery. It is easy to implement.

On Monday, September 30, 2024, Abdul Qoyyuum Haji Abdul Kadir (Agent Q) <
abdul.qoyy...@gmail.com> wrote:

> Hi all,
>
> I'm working on a Django project that puts Fabric into a webpage. The idea
> is simple, make a Fabric task that automates remote code execution from a
> webpage to authenticated/connected/authorized servers/machines/switches
> with a click of a button on a webpage with Fabric.
>
> Example usage and quick tutorial on how to use the Fabric package: FabFile
> Tutorial — Qoyyuum (buymeacoffee.com)
> <https://buymeacoffee.com/qoyyuum/fabfile-tutorial>
>
> This idea works but up to the point where I really need to respond to the
> commands executed on server-side (e.g. confirmation or it awkwardly
> re-prompting for sudo password). The webpage doesn't get this prompt for me
> to respond to, or rather, it won't stream the output from server side to
> django view side, enabling interactivity.
>
> Some suggested to use Async but I have no idea how to apply this: Asynchronous
> support | Django documentation | Django (djangoproject.com)
> <https://docs.djangoproject.com/en/5.1/topics/async/>
>
> If anyone can explain how to apply Async (or other solution) to enable
> interactivity to an automation script, I appreciate it. Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/21c986b4-0eb9-4454-86ea-fd0486973843n%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/21c986b4-0eb9-4454-86ea-fd0486973843n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACsKspmYA9xsX_O0joMewFAP-03gyceFn1EhGx-a5vTdyK6UPQ%40mail.gmail.com.

Reply via email to