Mailing List Archive

odd bric_soap error
Hi all

I may be doing something stupid but ... I can't get bric_soap to publish a list of stories.

When I use this code:

bric_soap story list_ids --search unexpired=1 element_type=excerpt | bric_soap workflow publish --chunks --continue-on-errors -


I get the error:

Argument "--continue-on-errors" isn't numeric in numeric eq (==) at /usr/bin/bric_soap line 655, <STDIN> line 236.


And going to bric_sap line 655:

# performs a given action in chunks increments
sub _foreach_chunks (&@) {
my $code = shift;
our $chunks;

if ($chunks == 0) {
$code->(@_);
} else {
# step through indexes $chunks at a time
my ($start, $end);
for ($start = 0; $start <= $#_; $start = $end + 1) {
$end = $start + $chunks - 1;
$end = $#_ if $end > $#_;
$code->(@_[$start .. $end]);
}
}
}

However if I just run this :

bric_soap story list_ids --search unexpired=1 element_type=excerpt

I get a list of IDs.

Trying shorter commands:

bric_soap story list_ids --search unexpired=1 element_type=excerpt | bric_soap workflow publish --chunks -

just results in new errors.

I think I have the right number of -- in front of everything so I wonder if this is a bug in Bricolage 2.0.1?

thanks
Dawn
Re: odd bric_soap error [ In reply to ]
On Aug 10, 2011, at 2:11 PM, Dawn Buie wrote:

> bric_soap story list_ids --search unexpired=1 element_type=excerpt | bric_soap workflow publish --chunks --continue-on-errors -
>
> I get the error:
>
> Argument "--continue-on-errors" isn't numeric in numeric eq (==) at /usr/bin/bric_soap line 655, <STDIN> line 236.

You need --chunks 100 or --chunks 50 or something. Otherwise it thinks you've passed --continue-on-errors as the argument to --chunks.

Best,

David
Re: odd bric_soap error [ In reply to ]
Of course - so it was a stupid error! Thanks David - it's working now.

Dawn

On 2011-08-10, at 5:32 PM, David E. Wheeler wrote:

> On Aug 10, 2011, at 2:11 PM, Dawn Buie wrote:
>
>> bric_soap story list_ids --search unexpired=1 element_type=excerpt | bric_soap workflow publish --chunks --continue-on-errors -
>>
>> I get the error:
>>
>> Argument "--continue-on-errors" isn't numeric in numeric eq (==) at /usr/bin/bric_soap line 655, <STDIN> line 236.
>
> You need --chunks 100 or --chunks 50 or something. Otherwise it thinks you've passed --continue-on-errors as the argument to --chunks.
>
> Best,
>
> David
>