UA server, don't require cassandra when using postgres
@@ -1018,18 +1018,19 @@ def main():
register_location(appscale_info.get_private_ip(), bindport)
-
- connect_to_postgres(zk_client)
- if pg_connection_wrapper:
- init_table(pg_connection_wrapper)
-
- db = appscale_datastore.DatastoreFactory.getDatastore(datastore_type)
ERROR_CODES = appscale_datastore.DatastoreFactory.error_codes()
valid_datastores = appscale_datastore.DatastoreFactory.valid_datastores()
if datastore_type not in valid_datastores:
raise Exception('{} not in valid datastores ({})'.
format(datastore_type, valid_datastores))
+ connect_to_postgres(zk_client)
+ if pg_connection_wrapper:
+ init_table(pg_connection_wrapper)
+ db = None
+ else:
+ db = appscale_datastore.DatastoreFactory.getDatastore(datastore_type)
+
# Keep trying until it gets the schema.
timeout = 5
while 1:
