Skip to content

Commit

Permalink
Create DB connection when initializing ARC2 store (Should fix some pr…
Browse files Browse the repository at this point in the history
…oblems in #59)
  • Loading branch information
samuell committed Mar 19, 2020
1 parent c945c75 commit 06a151f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions classes/RDFIO_ARC2StoreWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function __construct( $tripleStore = null ) {
'store_name' => preg_replace( '/s?unittest_/', '', $wgDBprefix ) . 'arc2store', // Determines table prefix
);
$this->arc2store = ARC2::getStore( $arc2StoreConfig );
$this->arc2store->createDBCon();
}

/**
Expand Down
1 change: 1 addition & 0 deletions maintenance/setupStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function execute() {
'store_name' => $wgDBprefix . 'arc2store', // Determines table prefix
);
$store = ARC2::getStore( $arc2StoreConfig );
$store->createDBCon();

if ( $store->isSetUp() ) {
$this->output( "Store is already set up, so not doing anything.\n" );
Expand Down
1 change: 1 addition & 0 deletions specials/SpecialRDFIOAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function execute( $par ) {
'store_name' => $wgDBprefix . 'arc2store', // Determines table prefix
);
$store = ARC2::getStore( $arc2StoreConfig );
$store->createDBCon();

if ( $store->isSetUp() ) {
$this->infoMsg( wfMessage( 'rdfio-triplestore-is-already-setup' )->parse() );
Expand Down
1 change: 1 addition & 0 deletions stores/SMW_ARC2Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function __construct() {
'store_name' => $wgDBprefix . 'arc2store', // Determines table prefix
);
$this->arc2store = ARC2::getStore( $arc2StoreConfig );
$this->arc2store->createDBCon();
}

/**
Expand Down

0 comments on commit 06a151f

Please sign in to comment.