CGRU / cgru

CGRU - AFANASY
http://cgru.info/
GNU Lesser General Public License v3.0
278 stars 111 forks source link

Job.setWaitTime() does not set "time_wait" for job #433

Closed yannci closed 5 years ago

yannci commented 5 years ago

When submitting a job via the python API the setWaitTime() method of the Job does not set "time_wait"

If I print the job.data "time_wait" is present, but after sending the job it has no "time_wait" on the job.

This issue occurs in afanasy 2.2.3

timurhai commented 5 years ago

It should. And it definitely works in 2.3.0.

lithorus commented 5 years ago

I can re-produce the error with this : job.setWaitTime(time.time()+5000) however if I convert it into an int it works : job.setWaitTime(int(time.time()+5000))

bug or invalid type of parameter? It would be easy to "sanitize" it in the setWaitTime() function

lithorus commented 5 years ago

Fixed in 55b538f204722fd6f071873807b7510e2441898c

yannci commented 5 years ago

If tried it with time.time(), too. Haven‘t thought about the cast to int, to be honest.

Thx for the fix!

lithorus commented 5 years ago

I'm gonna close this then