Skip to content

Commit

Permalink
bug 839696 - crontabber state middleware fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe committed Feb 15, 2013
1 parent 71595a9 commit 76d111b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions socorro/external/postgresql/crontabber_state.py
Expand Up @@ -6,7 +6,7 @@
import logging

from socorro.external.postgresql.base import PostgreSQLBase
from socorro.lib import datetimeutil, external_common
from socorro.lib import datetimeutil

logger = logging.getLogger("webapi")

Expand All @@ -17,17 +17,16 @@ class CrontabberState(PostgreSQLBase):
def get(self, **kwargs):
"""Return the current state of the server and the revisions of Socorro
and Breakpad. """
filters = []
params = external_common.parse_arguments(filters, kwargs)

sql = (
'/* socorro.external.postgresql.crontabber_state.CrontabberState'
'.get */\n'
'SELECT state, last_updated FROM crontabber_state;'
)

error_message = "Failed to retrieve server status data from PostgreSQL"
results = self.query(sql, params, error_message=error_message)
error_message = (
"Failed to retrieve crontabber state data from PostgreSQL"
)
results = self.query(sql, error_message=error_message)
result, = results
state, last_updated = result
return {
Expand Down

0 comments on commit 76d111b

Please sign in to comment.