mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-17 20:22:32 +00:00
fix: pipeline
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {ConnectorClient} from '@openstapps/api/lib/connector-client.js';
|
||||
import {HttpClient} from '@openstapps/api/lib/http-client.js';
|
||||
import {ConnectorClient, HttpClient} from '@openstapps/api';
|
||||
import {SCLicensePlate, SCNamespaces, SCThings} from '@openstapps/core';
|
||||
import {Connector} from './connector.js';
|
||||
|
||||
@@ -48,9 +47,6 @@ export function createUUID(itemIdentifier: unknown, licensePlate: SCLicensePlate
|
||||
export async function executeConnector<T extends SCThings>(backend: string, connector: Connector<T>) {
|
||||
const items: T[] = await connector.getItems();
|
||||
const client: ConnectorClient = new ConnectorClient(new HttpClient(), backend);
|
||||
try {
|
||||
await client.index<T>(items, connector.origin);
|
||||
} catch (err) {
|
||||
throw err;
|
||||
}
|
||||
// this might throw an error!
|
||||
await client.index<T>(items, connector.origin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user