Closed Bug 794264 Opened 13 years ago Closed 12 years ago

[crontabber] matviews should record result and messages from all stored proc calls

Categories

(Socorro :: Database, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 855423

People

(Reporter: peterbe, Assigned: peterbe)

References

Details

At the moment matviews.py run() methods just call the stored procedures. Instead, it should listen to the output and if it's negative (e.g. FALSE) it should loudly log about it. Currently it looks like this:: def run(self, connection): cursor = connection.cursor() cursor.callproc(self.get_proc_name()) connection.commit() It needs to look something like this:: def run(self, connection): cursor = connection.cursor() cursor.callproc(self.get_proc_name()) result, messages = cursor.fetchone() if result == 'false': logging.error(bla bla bla messages) connection.commit()
Depends on: 794261
Assignee: nobody → peterbe
In fact, log if there is *ANY* notice. (idea from Josh)
Alternatively if the result is FALSE, then log louder (e.g. logging.warning instead of logging.info)
create function test_notice () returns boolean language plpgsql as $f$ BEGIN RAISE NOTICE 'I raised a notice'; RETURN FALSE; END; $f$;
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.