[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamically changing remote servers list
From: |
Ole Tange |
Subject: |
Re: Dynamically changing remote servers list |
Date: |
Wed, 27 Aug 2014 08:38:56 +0200 |
On Tue, Aug 26, 2014 at 11:42 PM, Douglas A. Augusto
<daaugusto@gmail.com> wrote:
> On 25/08/2014 at 21:41,
:
> I'd like, though, to propose some modifications to the script. Here is the
> modified script:
>
> cat original.slf > updated.slf
'cat' is bad. See below.
> nice parallel --timeout 10 --nonall -j0 -k --slf original.slf --tag
> echo | sed -e 's/\t$//' -e '/\t/d' > tmp.slf
Maybe --timeout 1000% would make more sense: We do not know if these
machines are spread all over the world (or if it is done through Tor)
and whether 10 seconds is enough, but I would imagine that 10 times
the median value would always be enough.
> cat tmp.slf > updated.slf
'cat' is not atomic, so you will be inviting a race condition, where
the 'cat' runs exactly when GNU Parallel reads the file. 'mv' is
atomic - use that instead.
Think of how you can automatically start the script when GNU Parallel
is started, and stop when GNU Parallel stops. Maybe something like:
parallel_daemon start --slf original.slf
parallel --slf $UPDATED_SLF ...
parallel_daemon stop
Or even:
parallel_with_daemon --slf original.slf [... other parallel options ...]
How is cleanup done? How is cleanup done if the user presses Ctrl-C?
What happens if the users run multiple instances? With different original.slf?
/Ole
- Re: Dynamically changing remote servers list, (continued)
- Re: Dynamically changing remote servers list, ChessDoter, 2014/08/17
- Re: Dynamically changing remote servers list, ChessDoter, 2014/08/18
- Re: Dynamically changing remote servers list, Douglas A. Augusto, 2014/08/21
- Re: Dynamically changing remote servers list, Ole Tange, 2014/08/22
- Re: Dynamically changing remote servers list, Douglas A. Augusto, 2014/08/25
- Re: Dynamically changing remote servers list, Ole Tange, 2014/08/25
- Re: Dynamically changing remote servers list, Douglas A. Augusto, 2014/08/26
- Re: Dynamically changing remote servers list, Douglas A. Augusto, 2014/08/26
- Re: Dynamically changing remote servers list,
Ole Tange <=
- Re: Dynamically changing remote servers list, Douglas A. Augusto, 2014/08/27
- Re: Dynamically changing remote servers list, Ole Tange, 2014/08/27
- Re: Dynamically changing remote servers list, Douglas A. Augusto, 2014/08/29
- Re: Dynamically changing remote servers list, Ole Tange, 2014/08/30
- Re: Dynamically changing remote servers list, Douglas A. Augusto, 2014/08/27
- Re: Dynamically changing remote servers list, Ole Tange, 2014/08/27