jbellomy / bots

Automatically exported from code.google.com/p/bots
0 stars 0 forks source link

add: use jobqueueserver #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
server process bots-jobqueueserver maintains a job queue for the bots-engine.
the jobqueueserver ensures:
- bots-engine is not started up twice
- bots-engine runs are not discarded (which hapened in old situation: engine 
saw that it was already running and did an exit)
- bots-engine is started with new job almost as soon as last job ended

In bots.ini is indicated the jobqueueserver is used (should be running of 
course...)

Use bots-job2queue to send a new job to the queue, eg in scheduling

Jobs have a priority (default: 5, highest priority is 9).
Priority can be changed.

Original issue reported on code.google.com by hjebb...@gmail.com on 24 Sep 2012 at 4:30

GoogleCodeExporter commented 9 years ago
correction: highest (most important) priority is 1

Original comment by mjg1964 on 26 Sep 2012 at 1:13

GoogleCodeExporter commented 9 years ago
probably you are right, this is confusing to me.
probably something cultural; in Dutch schools the highest grade is 10, lowest 
is 1  ;-))

will check this agian.

Original comment by hjebb...@gmail.com on 26 Sep 2012 at 1:21

GoogleCodeExporter commented 9 years ago
Yes this may be a cultiral thing. My expectation is based on experience with 
iSeries (AS/400) systems. 
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/rzaks/rzakshowj
obqueuewrk.htm
Also generally in english the phrase "priority 1" means urgent or highest 
priority, for example when mailing a parcel.

Original comment by mjg1964 on 4 Oct 2012 at 5:56

GoogleCodeExporter commented 9 years ago
I suggest the commandline handling in job2queue.py should be changed slightly.

1. -c<config> needs to be used both for job2queue and for the engine job it 
adds, but not for other "non bots-engine" jobs. So make this decision by the 
position of the parameter; if it is before the program parameter then it is 
just used for job2queue. Currently you pass the configdir to *any* job added 
(and without the -c, this is a bug).

2. I believe having a "shortcut" parameter for bots-engine is worthwhile and 
means the command lines will be simpler for scheduling. I added --engine 
parameter for this.

Original comment by mjg1964 on 16 Oct 2012 at 9:46

Attachments:

GoogleCodeExporter commented 9 years ago
This is probably better. No "positional" parameter, but only pass the 
-c<config> to bots jobs.

Original comment by mjg1964 on 16 Oct 2012 at 10:55

Attachments:

GoogleCodeExporter commented 9 years ago
had some spaces replaced with tabs, fixed now

Original comment by mjg1964 on 17 Oct 2012 at 11:05

Attachments:

GoogleCodeExporter commented 9 years ago
hi Mike,

yes, there is a possible confusion of parameters for job2queue and program to 
lauch.
this is very dangerous.
changed this, only parameters before 'program' are read as options, other 
options are for the program.

About the shortcuts: I do nnot like it. 
My motivation:
- explicit is better than implicit, eg in scheduling.  
  By using explicit parameters it will always clear what you want to run,
  also 2 years and 3 bots-version later ;-))
- most of the time this is used via scheduler (so needs to be typed once)
- logic for finding the engine is tricky esp. for linux. 
  (I know this is done in web-server,  but I realy do not like it)
- about long parameters: think that to avoid to much typing this is better 
solved via batch file or similar.

Original comment by hjebb...@gmail.com on 25 Oct 2012 at 11:53

GoogleCodeExporter commented 9 years ago

Original comment by hjebb...@gmail.com on 10 Sep 2013 at 12:45