Open lunika opened 1 year ago
It's difficult to extend the rake task to accept an infinitely long list of recordings. You could do it manually using these commands:
docker exec -t scalelite-api bin/rails c
recordings = ['123123123','123123123', ...]
tenant_id = Tenant.find_by_name("TENANT_NAME").id
Recording.where(record_id: recordings).each do |rec| Metadatum.create!(recording_id: rec, key: 'tenant-id', value: tenant_id) end
Is it easier if only one recording id is provided ? In that case, an API endpoint could be easier to use for developer like us. WDYT ?
Potentially yes, we would just need to find the time to implement the API call
Problem to solve:
There is an existing rake command allowing to migrate all existing recording to a tenant. But there is no rake command to migrate a specific list of recording to a tenant. This command can be useful to migrate an existing scalelite instance from version before tenancy was available but used by multiple API client. Moreover, in some scenarios 2 tenancies can be merged in one and we would like to migrate recording from one to another one.
Purposed solution:
Modify the existing rake command with a list of recording options like this :
Considered alternatives:
There is a tenancy API, maybe a new endpoint can be added managing this issue ?