Skip to content

Commit

Permalink
Remove client-side batching of tenants.create endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmith023 committed Jul 23, 2024
1 parent bf4aec6 commit 2987a27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
WEAVIATE_124: 1.24.21
WEAVIATE_125: 1.25.8
WEAVIATE_126: 1.26.0
WEAVIATE_126: 1.26.1

jobs:
checks:
Expand Down
14 changes: 4 additions & 10 deletions src/collections/tenants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,10 @@ const tenants = (
return result;
});
return {
create: async (tenants: TenantBC | TenantCreate | (TenantBC | TenantCreate)[]) => {
const out: Tenant[] = [];
for await (const res of Serialize.tenants(parseValueOrValueArray(tenants), Serialize.tenantCreate).map(
(tenants) =>
new TenantsCreator(connection, collection, tenants).do().then((res) => res.map(parseTenantREST))
)) {
out.push(...res);
}
return out;
},
create: (tenants: TenantBC | TenantCreate | (TenantBC | TenantCreate)[]) =>
new TenantsCreator(connection, collection, parseValueOrValueArray(tenants).map(Serialize.tenantCreate))
.do()
.then((res) => res.map(parseTenantREST)),
get: async function () {
const check = await dbVersionSupport.supportsTenantsGetGRPCMethod();
return check.supports ? getGRPC() : getREST();
Expand Down

0 comments on commit 2987a27

Please sign in to comment.