akvo.rsr.usecases.django_q.schedules module
- class akvo.rsr.usecases.django_q.schedules.ScheduleSerializer(*args, **kwargs)[source]
Bases:
ModelSerializer
- class akvo.rsr.usecases.django_q.schedules.SyncAction(to_add: List[Schedule], to_modify: List[Schedule], to_delete: List[Schedule])[source]
Bases:
object
The operations to be done on the DB in order to sync the django-q schedules from the settings with the existing django-q schedules in the DB
- to_add: List[Schedule]
- to_delete: List[Schedule]
- to_modify: List[Schedule]
- akvo.rsr.usecases.django_q.schedules.apply_sync(action: SyncAction) QuerySet [source]
Applies the operations required to sync the schedules in the settings with the schedules in the DB
- akvo.rsr.usecases.django_q.schedules.calc_sync(setting_schedules: List[Schedule], db_schedules: List[Schedule] | None = None) SyncAction [source]
- Calculates the operations that have to be taken in order to sync the schedules in the settings
with the schedules in the db