Re: [PATCH] Downloading headers from the command line
"Calin A. Culianu" <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.pan.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 25 Mar 2007, Eric Lauriault wrote: > Hi guys, > > I've attached a small patch to download headers from the command line. > I've wanted to do this to download headers for a few groups > automatically without a gui while I'm away using crond. It's pretty much > the same idea as using pan as an nzb reader. The problem I'm > experiencing is that when the queue empties, the process just hangs > around until it gets receives a signal. The same behavior can be > observed while downloading using an nzb file from the command line. Is > this expected? > > Eric > Yeah that's due to the fact that the g_main_loop() is still running. The only way to really solve this is to create a class that implements Queue::Listener and when it receives the on_queue_task_removed() event, to query the queue and see if it's empty. If it is, it should call g_main_loop_quit(). I can go ahead and modify your patch to do that, but I am not sure what the consensus is about this feature (you may want to ask Charles if he agrees with the approach I outlined above?). -Calin