- License Usage Calculation realised
- View License Usages - Celery Beat container added - First schedule in Celery Beat for calculating usage (hourly) - repopack can now split for different components - Various fixes as consequece of changing file_location / file_name ==> bucket_name / object_name - Celery Routing / Queuing updated
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""Set storage_dirty flag for all tenants
|
||||
|
||||
Revision ID: 02debd224316
|
||||
Revises: 8fdd7f2965c1
|
||||
Create Date: 2024-10-08 06:53:17.261709
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '02debd224316'
|
||||
down_revision = '8fdd7f2965c1'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.execute('UPDATE tenant SET storage_dirty = TRUE')
|
||||
|
||||
|
||||
def downgrade():
|
||||
pass
|
||||
@@ -0,0 +1,46 @@
|
||||
"""LicenseUsage: correct mb fields to be floats iso integers
|
||||
|
||||
Revision ID: a678c84d5633
|
||||
Revises: 02debd224316
|
||||
Create Date: 2024-10-11 08:03:22.823327
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a678c84d5633'
|
||||
down_revision = '02debd224316'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('license_usage', schema=None) as batch_op:
|
||||
batch_op.alter_column('storage_mb_used',
|
||||
existing_type=sa.INTEGER(),
|
||||
type_=sa.Float(),
|
||||
existing_nullable=True)
|
||||
batch_op.alter_column('embedding_mb_used',
|
||||
existing_type=sa.INTEGER(),
|
||||
type_=sa.Float(),
|
||||
existing_nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('license_usage', schema=None) as batch_op:
|
||||
batch_op.alter_column('embedding_mb_used',
|
||||
existing_type=sa.Float(),
|
||||
type_=sa.INTEGER(),
|
||||
existing_nullable=True)
|
||||
batch_op.alter_column('storage_mb_used',
|
||||
existing_type=sa.Float(),
|
||||
type_=sa.INTEGER(),
|
||||
existing_nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user