Worker-side job status check should not use the database

Bug #882423 reported by Muharem Hrnjadovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Won't Fix
High
Unassigned

Bug Description

Presently Job.is_job_completed() obtains the job status from the
postgres database.
This introduces a new and unnecessary dependency. The job status
check should be based on data in the redis key-value-store instead.

Tags: database
Changed in openquake:
status: New → Confirmed
importance: Undecided → High
milestone: none → 0.4.5
John Tarter (toh2)
Changed in openquake:
milestone: 0.4.5 → 0.4.6
Revision history for this message
Lars Butler (lars-butler) wrote :

The `check_job_status` function which calls this bit of code is everywhere in our task code; it's called as the first statement of each task. We should consider refactoring `check_job_status` as a decorator to make things cleaner.

John Tarter (toh2)
Changed in openquake:
milestone: 0.4.6 → 0.5.1
John Tarter (toh2)
Changed in openquake:
milestone: 0.5.1 → none
tags: added: database
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

We may want to re-architect the system so that the workers compute results *and* write them to the database. This should give us better throughput.

In light of that it's fine for the workers to access the postgres database.

Revision history for this message
Lars Butler (lars-butler) wrote :

No need to fix. The workers do a lot of database interaction anyway. This is fine.

Changed in openquake:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.