mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Initial fix for concurrent update db issue (still using psycopg). Commented out "job requeued" log statement. Changed error reporting email in config.
This commit is contained in:
@@ -134,7 +134,7 @@ class JobQueue( object ):
|
||||
job_state = job.check_if_ready_to_run()
|
||||
if job_state == JOB_WAIT:
|
||||
new_waiting.append( job )
|
||||
log.debug( "job has been requeued" )
|
||||
#log.debug( "job has been requeued" )
|
||||
elif job_state == JOB_ERROR:
|
||||
log.info( "job %d ended with an error" %job.job_id )
|
||||
elif job_state == JOB_READY:
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Details of how the data model objects are mapped onto the relational database
|
||||
are encapsulated here.
|
||||
"""
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
import pkg_resources
|
||||
pkg_resources.require( "pysqlite>=2", "sqlalchemy>=0.3" )
|
||||
@@ -252,9 +254,24 @@ def init( file_path, url, **kwargs ):
|
||||
table.columns['create_time'].type = TIMESTAMP()
|
||||
if table.columns.has_key( "update_time" ):
|
||||
table.columns['update_time'].type = TIMESTAMP()
|
||||
table.columns['update_time'].type = TIMESTAMP()
|
||||
# Connect the metadata the database.
|
||||
metadata.connect( url, **kwargs )
|
||||
# Connect the metadata to the database.
|
||||
if url.find( "sqlite" ) < 0 and url.find( '///' ) >= 0:
|
||||
import psycopg
|
||||
try:
|
||||
dbconn = url.split('///')
|
||||
dbtype = dbconn[0]
|
||||
dbname = dbconn[1]
|
||||
def connect():
|
||||
connection = psycopg.connect( 'dbname=%s' %dbname )
|
||||
connection.set_isolation_level(1)
|
||||
return connection
|
||||
engine = create_engine('%s///' %dbtype, creator=connect)
|
||||
metadata.connect( engine )
|
||||
except:
|
||||
log.exception( "error connecting to database using connection: '%s'." % url )
|
||||
metadata.connect( url, **kwargs )
|
||||
else:
|
||||
metadata.connect( url, **kwargs )
|
||||
## metadata.engine.echo = True
|
||||
# Create tables if needed
|
||||
if create_tables:
|
||||
|
||||
@@ -7,7 +7,7 @@ class TestHistory( TwillTestCase ):
|
||||
self.logout() #Ensure we are not logged in
|
||||
self.history_options()
|
||||
self.check_page_for_string( 'logged in</a> to store or switch histories.' )
|
||||
self.login( email='test2@bx.psu.edu' ) #Just to make sure we hav created this account since it is used to share histories
|
||||
self.login( email='test2@bx.psu.edu' ) #Just to make sure we have created this account since it is used to share histories
|
||||
self.logout()
|
||||
def test_05_new_history_then_delete( self ):
|
||||
"""Testing creating a new history and then deleting it"""
|
||||
|
||||
@@ -80,7 +80,7 @@ mailing_join_addr = galaxy-user-join@bx.psu.edu
|
||||
|
||||
# Mail
|
||||
smtp_server = coltrane.bx.psu.edu
|
||||
error_email_to = james@bx.psu.edu
|
||||
error_email_to = galaxy_bugs@bx.psu.edu
|
||||
|
||||
# Use the new iframe / javascript based layout
|
||||
use_new_layout = true
|
||||
|
||||
Reference in New Issue
Block a user