On Sun, Jul 15, 2012 at 3:31 PM, Mohamed Lrhazi <[email protected]> wrote:
> Is this possible? I went through the docs and it does not show any
> examples of such usage, only via command line or a decorator.
It could be more explicit, but it's in there if you read carefully :)
http://docs.fabfile.org/en/1.4.3/usage/parallel.html#command-line-flags
"One may also force all tasks to run in parallel by using the
command-line flag -P or the env variable env.parallel."
So you can tickle env.parallel directly or via 'with settings', and
then task executions via execute() will run in parallel. E.g.:
with settings(parallel=True):
execute(mytaskfunction, hosts=[...])
In addition, decorators are simply functions themselves and can be
used to temporarily wrap otherwise un-decorated functions, so you
could also:
execute(parallel(mytaskfunction), hosts=[...])
Hope that helps,
Jeff
>
> Is there a way?
>
> Thanks a lot,
> Mohamed.
>
> _______________________________________________
> Fab-user mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/fab-user
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user