[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] Usage of parallel option in fabric
From: |
Morgan Goose |
Subject: |
Re: [Fab-user] Usage of parallel option in fabric |
Date: |
Sun, 20 May 2012 15:52:24 -0700 |
use execute for switching on the fly if the fab -P/--parallel flag
doesn't work for you:
def foo():
pass
@task
def bar():
execute(parallel(foo), hosts=host_list)
execute(foo, hosts=other_host_list)
On the second question, what are you actually asking? Also we use
multiprocessing not gevent, to get parallel execution, over
concurrency.
-goose
On Sun, May 20, 2012 at 8:31 AM, kracekumar <address@hidden> wrote:
> Hello
>
> I viewed the source code and documentation of fabric, found I need use
> @parallel decorator to run func in parallel mode. I have two thoughts here.
>
> I feel parallel(functions = {'host1': [func1, func2, func3], 'host2':
> [func4, func5]}, pool = 2) seems more pragrammatic.
>
> This gives me option to use same function with and without parallel
> mode.
>
>
> 2. I couldn't see multiprocessing or gevent module getting called but
> Random.task(), is there any specific reason ?
>
> --
> Thanks & Regards
> Kracekumar.R
> "Talk is cheap, show me the code." -- Linus Torvalds
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user
>