saga-project / bliss

ATTENTION: bliss is now saga-python. Please check out the new project website for the latest version: http://saga-project.github.com/saga-python/
http://saga-project.github.com/saga-python/
Other
8 stars 4 forks source link

Check job.get_state() example #77

Closed oweidner closed 11 years ago

oweidner commented 11 years ago

According to Pradeep, the examples in the API documentation do not work:

http://saga-project.github.com/bliss/apidoc/bliss.saga.job.Job.Job-class.html#get_state

oweidner commented 11 years ago

Same seems to hold true for run(), cancel(), ... examples. Please double-check all of them!

andre-merzky commented 11 years ago

Thanks, fixed. I left job.state though -- that will work after the attribute merge...

Cheers, Andre.

On Mon, Aug 13, 2012 at 10:41 PM, Ole Weidner notifications@github.com wrote:

Same seems to hold true for run(), cancel(), ... examples. Please double-check all of them!

— Reply to this email directly or view it on GitHub.

Nothing is ever easy...

oweidner commented 11 years ago

Hm,

but the adaptors don't implement it ?!?

On Aug 13, 2012, at 4:17 PM, Andre Merzky notifications@github.com wrote:

Thanks, fixed. I left job.state though -- that will work after the attribute merge...

Cheers, Andre.

On Mon, Aug 13, 2012 at 10:41 PM, Ole Weidner notifications@github.com wrote:

Same seems to hold true for run(), cancel(), ... examples. Please double-check all of them!

— Reply to this email directly or view it on GitHub.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

andre-merzky commented 11 years ago

On Mon, Aug 13, 2012 at 11:37 PM, Ole Weidner notifications@github.comwrote:

Hm,

but the adaptors don't implement it ?!?

Hmm, good point - I;ll think of a convenient way to add adaptor, aehm, plugin level polling...

A.

  • Ole

On Aug 13, 2012, at 4:17 PM, Andre Merzky notifications@github.com wrote:

Thanks, fixed. I left job.state though -- that will work after the attribute merge...

Cheers, Andre.

On Mon, Aug 13, 2012 at 10:41 PM, Ole Weidner notifications@github.com wrote:

Same seems to hold true for run(), cancel(), ... examples. Please double-check all of them!

— Reply to this email directly or view it on GitHub.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/saga-project/bliss/issues/77#issuecomment-7708957.

Nothing is ever easy...

oweidner commented 11 years ago

Please remove the state attribute for now.

Thanks, Ole

On Aug 13, 2012, at 4:42 PM, Andre Merzky notifications@github.com wrote:

On Mon, Aug 13, 2012 at 11:37 PM, Ole Weidner notifications@github.comwrote:

Hm,

but the adaptors don't implement it ?!?

Hmm, good point - I;ll think of a convenient way to add adaptor, aehm, plugin level polling...

A.

  • Ole

On Aug 13, 2012, at 4:17 PM, Andre Merzky notifications@github.com wrote:

Thanks, fixed. I left job.state though -- that will work after the attribute merge...

Cheers, Andre.

On Mon, Aug 13, 2012 at 10:41 PM, Ole Weidner notifications@github.com wrote:

Same seems to hold true for run(), cancel(), ... examples. Please double-check all of them!

— Reply to this email directly or view it on GitHub.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/saga-project/bliss/issues/77#issuecomment-7708957.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

andre-merzky commented 11 years ago

Done.

A.

On Tue, Aug 14, 2012 at 12:25 AM, Ole Weidner notifications@github.comwrote:

Please remove the state attribute for now.

Thanks, Ole

On Aug 13, 2012, at 4:42 PM, Andre Merzky notifications@github.com wrote:

On Mon, Aug 13, 2012 at 11:37 PM, Ole Weidner notifications@github.comwrote:

Hm,

but the adaptors don't implement it ?!?

Hmm, good point - I;ll think of a convenient way to add adaptor, aehm, plugin level polling...

A.

  • Ole

On Aug 13, 2012, at 4:17 PM, Andre Merzky notifications@github.com wrote:

Thanks, fixed. I left job.state though -- that will work after the attribute merge...

Cheers, Andre.

On Mon, Aug 13, 2012 at 10:41 PM, Ole Weidner < notifications@github.com> wrote:

Same seems to hold true for run(), cancel(), ... examples. Please double-check all of them!

— Reply to this email directly or view it on GitHub.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub< https://github.com/saga-project/bliss/issues/77#issuecomment-7708957>.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/saga-project/bliss/issues/77#issuecomment-7710281.

Nothing is ever easy...

andre-merzky commented 11 years ago

Hi Ole,

if you look at the attribute branch, you'll see that test//compliance/job/01_run_remote_exe.py there uses job.state instead of job.get_state(). That now works -- the attribute retrieval is bound to the API level 'get_state()' method via

self.attributes_setgetter ('State', self.get_state)

in bliss/saga/job/Job.py. For other attributes which to not have an explicit getter which goes to the adaptor, either the adaptors need to ensure that attribute values are updated as needed, or one needs to add explicit setter/getter -- see for example how that is done for exitcode in the same location as above.

So, again, comments welcome. If that scheme works for you, I'll update the other classes/attributes...

Best, Andre.

On Tue, Aug 14, 2012 at 1:36 PM, Andre Merzky andre@merzky.net wrote:

Done.

A.

On Tue, Aug 14, 2012 at 12:25 AM, Ole Weidner notifications@github.com wrote:

Please remove the state attribute for now.

Thanks, Ole

On Aug 13, 2012, at 4:42 PM, Andre Merzky notifications@github.com wrote:

On Mon, Aug 13, 2012 at 11:37 PM, Ole Weidner notifications@github.comwrote:

Hm,

but the adaptors don't implement it ?!?

Hmm, good point - I;ll think of a convenient way to add adaptor, aehm, plugin level polling...

A.

  • Ole

On Aug 13, 2012, at 4:17 PM, Andre Merzky notifications@github.com wrote:

Thanks, fixed. I left job.state though -- that will work after the attribute merge...

Cheers, Andre.

On Mon, Aug 13, 2012 at 10:41 PM, Ole Weidner notifications@github.com wrote:

Same seems to hold true for run(), cancel(), ... examples. Please double-check all of them!

— Reply to this email directly or view it on GitHub.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/saga-project/bliss/issues/77#issuecomment-7708957.

Nothing is ever easy... — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

Nothing is ever easy...

Nothing is ever easy...

oweidner commented 11 years ago

fixed