Skip to content

refactor: move batch suspension methods from EE to CE #86

@genro

Description

@genro

Problem

Batch suspension methods are currently in TenantsTable_EE but they are useful for CE too:

  • Single-tenant (CE) can still have multiple batches (campaigns, newsletters)
  • Suspending/activating a batch is operational control, not multi-tenant management
  • No dependency on EE features (API keys, multi-tenant auth)

Current Location (Wrong)

src/enterprise/mail_proxy/entities/tenant/table_ee.py:

  • suspend_batch(tenant_id, batch_code)
  • activate_batch(tenant_id, batch_code)
  • get_suspended_batches(tenant_id)

Target Location (Correct)

src/core/mail_proxy/entities/tenant/table.py:

  • Move all three methods to CE table

src/core/mail_proxy/entities/tenant/endpoint.py:

  • Add endpoint methods to expose via API/CLI

Tasks

  • Move suspend_batch, activate_batch, get_suspended_batches from table_ee.py to table.py
  • Add suspend, activate, get_suspended methods to TenantEndpoint
  • Update imports if needed
  • Update tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions