Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/mtx/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,8 @@ const _deleteObjectStoreInstance = async (sm_url, instanceID, token) => {
}

cds.on('listening', async () => {
const profiles = cds.env.profiles ?? [cds.env.profile]
const objectStoreKind = cds.env.requires?.attachments?.objectStore?.kind
if (profiles.includes('mtx-sidecar') && cds.env.requires?.attachments?.kind !== 'db') {
if (cds.env.requires?.multitenancy && cds.env.requires?.attachments?.kind !== 'db') {
const ds = await cds.connect.to("cds.xt.DeploymentService")
if (objectStoreKind === "separate") {
ds.after('subscribe', async (_, req) => {
Expand All @@ -386,11 +385,11 @@ cds.on('listening', async () => {

const token = await _fetchToken(url, clientid, clientsecret, certificate, key)

const existingTenantBindings = await fetchObjectStoreBinding(tenant, token);
const existingTenantBindings = await fetchObjectStoreBinding(tenant, token)

if (existingTenantBindings.length) {
LOG.info(`Existing tenant specific object store for ${tenant} exists. Skipping creation of new one.`)
return;
return
}

const offeringID = await _getOfferingID(sm_url, token)
Expand Down