[hg] galaxy 3152: AMQP listener now updates request_event table ...
details: http://www.bx.psu.edu/hg/galaxy/rev/b01c8245ef74 changeset: 3152:b01c8245ef74 user: rc date: Mon Dec 07 14:45:09 2009 -0500 description: AMQP listener now updates request_event table when all samples have finished processing diffstat: scripts/galaxy_messaging/server/galaxydb_interface.py | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diffs (31 lines): diff -r 7ed9740a5927 -r b01c8245ef74 scripts/galaxy_messaging/server/galaxydb_interface.py --- a/scripts/galaxy_messaging/server/galaxydb_interface.py Fri Dec 04 14:50:00 2009 -0500 +++ b/scripts/galaxy_messaging/server/galaxydb_interface.py Mon Dec 07 14:45:09 2009 -0500 @@ -33,6 +33,7 @@ self.event_table = Table('sample_event', self.metadata, autoload=True ) self.sample_table = Table('sample', self.metadata, autoload=True ) self.request_table = Table('request', self.metadata, autoload=True ) + self.request_event_table = Table('request_event', self.metadata, autoload=True ) self.state_table = Table('sample_state', self.metadata, autoload=True ) def get_sample_id(self, field_name='bar_code', value=None): @@ -118,12 +119,13 @@ break if request_complete: request_state = 'Complete' - else: - request_state = 'Submitted' - log.debug('Updating request_id %i state to "%s"' % (self.request_id, request_state)) - i = self.request_table.update(whereclause=self.request_table.c.id==self.request_id, - values={self.request_table.c.state: request_state}) - i.execute() + log.debug('Updating request_id %i state to "%s"' % (self.request_id, request_state)) + i = self.request_event_table.insert() + i.execute(update_time=datetime.utcnow(), + create_time=datetime.utcnow(), + request_id=self.request_id, + state=request_state, + comment='All samples of this request have finished processing.')
participants (1)
-
Greg Von Kuster