Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

harden _cancel_prolonged_job against missing running_start_time #665

Open
soxofaan opened this issue Nov 19, 2024 · 2 comments
Open

harden _cancel_prolonged_job against missing running_start_time #665

soxofaan opened this issue Nov 19, 2024 · 2 comments

Comments

@soxofaan
Copy link
Member

  File ".../openeo/extra/job_management.py", line 474, in run_jobs
   self._job_update_loop(job_db=job_db, start_job=start_job, stats=stats)
  File ".../openeo/extra/job_management.py", line 493, in _job_update_loop
   self._track_statuses(job_db, stats=stats)
  File ".../openeo/extra/job_management.py", line 702, in _track_statuses
   self._cancel_prolonged_job(the_job, active.loc[i])
  File ".../openeo/extra/job_management.py", line 632, in _cancel_prolonged_job
   job_running_start_time = rfc3339.parse_datetime(row["running_start_time"], with_timezone=True)
  File ".../openeo/util.py", line 157, in parse_datetime
   raise ValueError(x)
ValueError: nan

_cancel_prolonged_job should not fail that ugly when running_start_time is not available (various reasons for that)

@HansVRP
Copy link
Contributor

HansVRP commented Nov 20, 2024

Would it be best to write some "try, except pass" around it?

@soxofaan
Copy link
Member Author

indeed, but I would at least put a warning/info log in the except to make it a bit visible that something did not work as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants