Re: RFC: enable bibsched scripting capabilities [draft patch]

2013-06-28 Thread Alexander Wagner

On 27.06.2013 16:28, Ferran Jorba wrote:

Hi!

[...]

One very curious behaviour is that the first task after midnight
switches to SCHEDULED state but doesn't run.


Strange indeed. However, the guys at RWTH had something similar with a
cron job that seemed to put bibsched to manual operation. I'm not sure
if it still persists, but it's nasty as well.


I get the friendly daily mail as such:

  Emergency from http://ddd.uab.cat: BibSched halted: Process bibsort
  (task_id: 140997) was launched but seems not to be able to reach
  RUNNING status.

Anyhow, I needed a mechanism to automate my daily manual task to put
bibsched into manual mode, know which is the task in SCHEDULED state,
run it and put bibsched back to automatic mode.


Out of sheer curiosity: does putting bibsched to manual and run the task
really put to running status? I wonder how that could work. Sounds like
a deeper problem, cause (without knowing the internals of bibsched) this
is exactly what bibsched is supposed to do automagically, right? It
shounds a bit strange, that hooking up a scheduler with another
scheduler (cron, I guess ;) makes the first one working.


I have been patching bibsched to allow, at least, those basic scripting
capabilities.  I don't know how many more tasks do I need (acKnowledge
errors, maybe?).  I'm unsure on the names I have choosen.


How compares bibsched --mode to bibsched stop/start?

Do you know how much of your stuff could be accomplished by these
bibtasklet stuff?

--

Kind regards,

Alexander Wagner
Subject Specialist
Central Library
52425 Juelich

mail : a.wag...@fz-juelich.de
phone: +49 2461 61-1586
Fax  : +49 2461 61-6103
www.fz-juelich.de/zb/DE/zb-fi




Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt




Re: RFC: enable bibsched scripting capabilities [draft patch]

2013-06-28 Thread Ferran Jorba
Hi Samuele,

El Fri, 28 Jun 2013 09:26:03 +0200 Samuele Kaplun samuele.kap...@cern.ch 
escrigué:

[...]
  As I feel that it may be useful to somebody else, so I submit it for
  your consideration.
 
 Indeed it could be useful to manipulate tasks in the queue
 programmatically... so thanks for your idea! The only thing is that
 we are about to integrate into main Invenio e refactored bibsched
 which is the results of several improvements we have introduced for
 the INSPIRE usecase...
 
 We can see how easy it is to apply your suggested CLI improvements.

Good.

[...]
 You can have a peek at it here:
 
 http://invenio-software.org/repo/personal/invenio-adeiana/log/?h=bibsched-refactoring

I'll take a look in the next few days, thank you.

Ferran


Re: RFC: enable bibsched scripting capabilities [draft patch]

2013-06-28 Thread Ferran Jorba
Hi Samuele,

El Fri, 28 Jun 2013 13:38:00 +0200 Samuele Kaplun samuele.kap...@cern.ch 
escrigué:

 On Friday 28 June 2013 13:32:01 Alexander Wagner wrote:
  Or, the other way round: I had expected, that if the job as such
  has a problem it wouldn't reach running status /regardless/ if I
  hit R interactively, or the scheduler launches the same thing
  automatically.
 
 Maybe if Ferran would hit manually R at midnight then the task would
 actually not run? There is indeed this bug addressed here:
 
 http://invenio-software.org/ticket/1432

Except that, and this is valid also for the date parse hypothesis,
in my case it happens only in one Invenio for each server.  The other
one runs flawlessly.  And there are no code differences, I've checked
several times.

Ferran