def sync_efs_to_s3(): setup_django() from dvaapp.models import Video, TEvent from dvaapp.tasks import sync_bucket_video_by_id for v in Video.objects.all(): e = TEvent() e.video_id = v.pk e.operation = 'sync_bucket_video_by_id' e.save() sync_bucket_video_by_id(e.pk)
def sync_efs_to_s3(): setup_django() from dvaapp.models import Video,TEvent from dvaapp.tasks import sync_bucket_video_by_id for v in Video.objects.all(): e = TEvent() e.video_id = v.pk e.operation = 'sync_bucket_video_by_id' e.save() sync_bucket_video_by_id(e.pk)