Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geclipse-dev] Executable in jsdl description

Hello Romain!

Romain pisze:
However, a problem with the status still remains.

In fact I am trying to detect when the job is done by active waiting.


But the status DONE integer code is not equal to IGridJobStatus.DONE, and several status have the same id.

System.out.println(stat.getName() + " " + stat.getType() + " != " + IGridJobStatus.DONE);

WAITING 2 != 8
READY 1 != 8
SCHEDULED 2 != 8
DONE 16 != 8


A few details about jobs status:
1. IGridJobStatus.getName() always return string returned by grid. We show this string to user, but don't interpret it. So in your case glite really returned DONE

2. getType() return the status meaning: we parse status from grid and map it to g-Eclipse status. Please use getType() to check if your job is executed, done, failed etc

3. At the end you got status type 0x10, what means ABORTED. Sometimes gLite return string DONE, but job itself has DoneCode != OK. Then we treat such job as ABORTED. This occurs for your job.

For more details please look into method:
eu.geclipse.glite.resources.GliteJobStatus.GliteJobStatus(JobStatus)



Is there a status updater already implemented in geclipse?
Yes: eu.geclipse.core.JobStatusUpdater

Updater updates job status only if user set preference: g-Eclipse / Job Updates Settings / Job Status Updates active

To change this preference programically you may use: eu.geclipse.core.Preferences.setUpdateJobsStatus(boolean)


To be notified when job status is changing, you can register IGridJobStatusListener in IGridJobManager e.g.GridModel.getJobManager().addJobStatusListener( listener );

--
Pozdrawiam,
Mariusz Wojtysiak


Back to the top