]>
git.ipfire.org Git - people/jschlag/pbs.git/blob - src/manager/bugs.py
7 class BugsUpdateEvent(base
.Event
):
8 # User feedback gets a high priority.
13 return self
.pakfire
.settings
.get_int("bugzilla_update_interval", 60)
16 # Get up to ten updates.
17 query
= self
.db
.query("SELECT * FROM builds_bugs_updates \
18 WHERE error = 'N' ORDER BY time")
20 # XXX CHECK IF BZ IS ACTUALLY REACHABLE AND WORKING
24 bug
= self
.pakfire
.bugzilla
.get_bug(update
.bug_id
)
26 logging
.error("Bug #%s does not exist." % update
.bug_id
)
30 bug
.set_status(update
.status
, update
.resolution
, update
.comment
)
33 # If there was an error, we save that and go on.
34 self
.db
.execute("UPDATE builds_bugs_updates SET error = 'Y', error_msg = %s \
35 WHERE id = %s", "%s" % e
, update
.id)
38 # Remove the update when it has been done successfully.
39 self
.db
.execute("DELETE FROM builds_bugs_updates WHERE id = %s", update
.id)