Changeset 670:7928f08e0c01
- Timestamp:
- 10/11/07 16:09:25
(1 year ago)
- Author:
- Greg Von Kuster <greg@bx.psu.edu>
- branch:
- default
- convert_revision:
- svn:9bcadc22-80f8-0310-8a53-c8f022958886/galaxy/trunk@2011
- Message:
Initial fix for concurrent update db issue (still using psycopg). Commented out "job requeued" log statement. Changed error reporting email in config.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r636 |
r670 |
|
| 135 | 135 | if job_state == JOB_WAIT: |
|---|
| 136 | 136 | new_waiting.append( job ) |
|---|
| 137 | | log.debug( "job has been requeued" ) |
|---|
| | 137 | #log.debug( "job has been requeued" ) |
|---|
| 138 | 138 | elif job_state == JOB_ERROR: |
|---|
| 139 | 139 | log.info( "job %d ended with an error" %job.job_id ) |
|---|
| r657 |
r670 |
|
| 3 | 3 | are encapsulated here. |
|---|
| 4 | 4 | """ |
|---|
| | 5 | import logging |
|---|
| | 6 | log = logging.getLogger( __name__ ) |
|---|
| 5 | 7 | |
|---|
| 6 | 8 | import pkg_resources |
|---|
| … | … | |
| 253 | 255 | if table.columns.has_key( "update_time" ): |
|---|
| 254 | 256 | table.columns['update_time'].type = TIMESTAMP() |
|---|
| 255 | | table.columns['update_time'].type = TIMESTAMP() |
|---|
| 256 | | # Connect the metadata the database. |
|---|
| 257 | | metadata.connect( url, **kwargs ) |
|---|
| | 257 | # Connect the metadata to the database. |
|---|
| | 258 | if url.find( "sqlite" ) < 0 and url.find( '///' ) >= 0: |
|---|
| | 259 | import psycopg |
|---|
| | 260 | try: |
|---|
| | 261 | dbconn = url.split('///') |
|---|
| | 262 | dbtype = dbconn[0] |
|---|
| | 263 | dbname = dbconn[1] |
|---|
| | 264 | def connect(): |
|---|
| | 265 | connection = psycopg.connect( 'dbname=%s' %dbname ) |
|---|
| | 266 | connection.set_isolation_level(1) |
|---|
| | 267 | return connection |
|---|
| | 268 | engine = create_engine('%s///' %dbtype, creator=connect) |
|---|
| | 269 | metadata.connect( engine ) |
|---|
| | 270 | except: |
|---|
| | 271 | log.exception( "error connecting to database using connection: '%s'." % url ) |
|---|
| | 272 | metadata.connect( url, **kwargs ) |
|---|
| | 273 | else: |
|---|
| | 274 | metadata.connect( url, **kwargs ) |
|---|
| 258 | 275 | ## metadata.engine.echo = True |
|---|
| 259 | 276 | # Create tables if needed |
|---|
| r663 |
r670 |
|
| 8 | 8 | self.history_options() |
|---|
| 9 | 9 | self.check_page_for_string( 'logged in</a> to store or switch histories.' ) |
|---|
| 10 | | self.login( email='test2@bx.psu.edu' ) #Just to make sure we hav created this account since it is used to share histories |
|---|
| | 10 | self.login( email='test2@bx.psu.edu' ) #Just to make sure we have created this account since it is used to share histories |
|---|
| 11 | 11 | self.logout() |
|---|
| 12 | 12 | def test_05_new_history_then_delete( self ): |
|---|
| r640 |
r670 |
|
| 81 | 81 | # Mail |
|---|
| 82 | 82 | smtp_server = coltrane.bx.psu.edu |
|---|
| 83 | | error_email_to = james@bx.psu.edu |
|---|
| | 83 | error_email_to = galaxy_bugs@bx.psu.edu |
|---|
| 84 | 84 | |
|---|
| 85 | 85 | # Use the new iframe / javascript based layout |
|---|