Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

republish all

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


arnold at webit

Aug 11, 2008, 2:12 AM

Post #1 of 6 (345 views)
Permalink
republish all

hi,

I tried to build my own republish all script in a template like this:

<%perl>
my @all_assets = Bric::Biz::Asset::Business::Story->list({
checked_out => 0,
active => 1,
unexpired => 1,
});

foreach (@all_assets) {
$burner->blaze_another($_);
}
</%perl>

The problem is, that the republish process takes about 20 minutes (many stories).
The maximum request time of my firefox is 5 minutes. So my firefox breaks after this 5 minutes
and after finishing the republish all process the connection is still closed and so
the error_log says: (broken pipe): client stopped connection before rflush completed

So i thinked about an external script, which use the bric_soap to republish all the stories and medias.
My idea is to write a template like this:

<%perl>
my $retval = fork();
if ($retval == -1) {
print STDERR "fork() failed: $!\n";
} elsif ($retval == 0 ) {
exec 'my_republish_all_script';
exit 1;
}
</%perl>

is that a good idea or can this bring some effects of other compoments ?

thanks a lot

maik


--
Maik Arnold
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-20 | Telefax +49 351 46766-66
arnold[at]webit.de | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold
Attachments: signature.asc (0.18 KB)


paulo at digitalcraftsmen

Aug 11, 2008, 2:52 AM

Post #2 of 6 (320 views)
Permalink
Re: republish all [In reply to]

Hi,

Could you set the timeout of bric_soap to half an hour and use it to
republish everything using your existing template ?

regards,

Paul


arnold at webit

Aug 11, 2008, 3:17 AM

Post #3 of 6 (316 views)
Permalink
Re: republish all [In reply to]

> Could you set the timeout of bric_soap to half an hour and use it to
> republish everything using your existing template ?

the timeout of the bric_soap is not the problem. I have a script to
republish all and this script works fine when I start it in a shell.
What I want is, to give the users of bricolage the possibilty to make a
republish_all in the bricolage enviroment and so I want to execute the
bric_soap script in the gui, like a story call "Republish All". So the
users can preview this story, that execute the bric_soap script.

I hope you understand my concern.

maik


--
Maik Arnold
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-20 | Telefax +49 351 46766-66
arnold[at]webit.de | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold
Attachments: signature.asc (0.18 KB)


lannings at who

Aug 11, 2008, 3:49 AM

Post #4 of 6 (318 views)
Permalink
RE: republish all [In reply to]

I don't think it's actually a firefox timeout, is it?
You could probably configure "Timeout" in conf/httpd.conf
to be a bigger number if you really want the browser
to spin for a half hour.

I'd probably prefer a hacked-in link in the UI;
I don't know why you'd want to do it from a template.
Assuming you use the bric_queued, you could
just hack the Bulk Publish stuff so that it selects
all categories instead of giving a choice of categories,
so this "Republish Everything" link would just put all
documents and media into the job queue.

-----Original Message-----
From: Maik Arnold [mailto:arnold[at]webit.de]
Sent: Mon 8/11/2008 12:17 PM
To: users[at]lists.bricolage.cc
Subject: Re: republish all

> Could you set the timeout of bric_soap to half an hour and use it to
> republish everything using your existing template ?

the timeout of the bric_soap is not the problem. I have a script to
republish all and this script works fine when I start it in a shell.
What I want is, to give the users of bricolage the possibilty to make a
republish_all in the bricolage enviroment and so I want to execute the
bric_soap script in the gui, like a story call "Republish All". So the
users can preview this story, that execute the bric_soap script.

I hope you understand my concern.

maik


arnold at webit

Aug 11, 2008, 4:30 AM

Post #5 of 6 (319 views)
Permalink
RE: republish all [In reply to]

Am Montag, den 11.08.2008, 12:49 +0200 schrieb Lanning, Scott:
> I don't think it's actually a firefox timeout, is it?
its an firefox timeout beecause the default request timeout is 300 sec
> You could probably configure "Timeout" in conf/httpd.conf
> to be a bigger number if you really want the browser
> to spin for a half hour.
no I dont want that

> I'd probably prefer a hacked-in link in the UI;
> I don't know why you'd want to do it from a template.
> Assuming you use the bric_queued, you could
> just hack the Bulk Publish stuff so that it selects
> all categories instead of giving a choice of categories,
> so this "Republish Everything" link would just put all
> documents and media into the job queue.
I understand you're intention, but how could I do that?
Can you explain it a bit deeper ?

thanks
>
> -----Original Message-----
> From: Maik Arnold [mailto:arnold[at]webit.de]
> Sent: Mon 8/11/2008 12:17 PM
> To: users[at]lists.bricolage.cc
> Subject: Re: republish all
>
> > Could you set the timeout of bric_soap to half an hour and use it to
> > republish everything using your existing template ?
>
> the timeout of the bric_soap is not the problem. I have a script to
> republish all and this script works fine when I start it in a shell.
> What I want is, to give the users of bricolage the possibilty to make a
> republish_all in the bricolage enviroment and so I want to execute the
> bric_soap script in the gui, like a story call "Republish All". So the
> users can preview this story, that execute the bric_soap script.
>
> I hope you understand my concern.
>
> maik
Attachments: signature.asc (0.18 KB)


lannings at who

Aug 11, 2008, 4:46 AM

Post #6 of 6 (318 views)
Permalink
RE: republish all [In reply to]

I haven't tried it, but if I did
I'd probably put a little hack in
lib/Bric/App/Callback/BulkPublish.pm
with a parameter like "all_categories"

my $param = $self->params;
# ...

(exists $param->{all_categories} ? () : (category_id => ANY(@$cat_ids)))

then try the link

/admin/control/publish?bulk_publish|publish_categories_cb&all_categories=1

I'd have to test it, since I have no idea if that works.

-----Original Message-----
From: Maik Arnold [mailto:arnold[at]webit.de]
Sent: Mon 8/11/2008 1:30 PM
To: users[at]lists.bricolage.cc
Subject: RE: republish all

Am Montag, den 11.08.2008, 12:49 +0200 schrieb Lanning, Scott:
> I don't think it's actually a firefox timeout, is it?
its an firefox timeout beecause the default request timeout is 300 sec
> You could probably configure "Timeout" in conf/httpd.conf
> to be a bigger number if you really want the browser
> to spin for a half hour.
no I dont want that

> I'd probably prefer a hacked-in link in the UI;
> I don't know why you'd want to do it from a template.
> Assuming you use the bric_queued, you could
> just hack the Bulk Publish stuff so that it selects
> all categories instead of giving a choice of categories,
> so this "Republish Everything" link would just put all
> documents and media into the job queue.
I understand you're intention, but how could I do that?
Can you explain it a bit deeper ?

thanks
>
> -----Original Message-----
> From: Maik Arnold [mailto:arnold[at]webit.de]
> Sent: Mon 8/11/2008 12:17 PM
> To: users[at]lists.bricolage.cc
> Subject: Re: republish all
>
> > Could you set the timeout of bric_soap to half an hour and use it to
> > republish everything using your existing template ?
>
> the timeout of the bric_soap is not the problem. I have a script to
> republish all and this script works fine when I start it in a shell.
> What I want is, to give the users of bricolage the possibilty to make a
> republish_all in the bricolage enviroment and so I want to execute the
> bric_soap script in the gui, like a story call "Republish All". So the
> users can preview this story, that execute the bric_soap script.
>
> I hope you understand my concern.
>
> maik

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.