Skip to content

Commit

Permalink
Fix black in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
odkhang committed Dec 9, 2024
1 parent d9ff9fc commit dc7e1cd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 10 additions & 4 deletions server/venueless/api/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def generate_talk_token(video_settings, video_tokens, event_slug):


@shared_task(bind=True, max_retries=5, default_retry_delay=60)
def configure_video_settings_for_talks(self,world_id, days, number, traits, long=False):
def configure_video_settings_for_talks(
self, world_id, days, number, traits, long=False
):
"""
Configure video settings for talks
:param self: instance of the task
Expand Down Expand Up @@ -110,12 +112,16 @@ def configure_video_settings_for_talks(self,world_id, days, number, traits, long
}
}
try:
requests.post('{}/api/configure-video-settings/'.format(settings.EVENTYAY_TALK_BASE_PATH), json=payload, headers=header)
world.config['pretalx'] = {
requests.post(
"{}/api/configure-video-settings/".format(settings.EVENTYAY_TALK_BASE_PATH),
json=payload,
headers=header,
)
world.config["pretalx"] = {
"event": event_slug,
"domain": "{}".format(settings.EVENTYAY_TALK_BASE_PATH),
"pushed": datetime.datetime.now().isoformat(),
"connected": True
"connected": True,
}
world.save()
except requests.exceptions.ConnectionError as e:
Expand Down
4 changes: 3 additions & 1 deletion server/venueless/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ def post(request, *args, **kwargs) -> JsonResponse:
config=config,
trait_grants=trait_grants,
)
configure_video_settings_for_talks.delay(world_id, days=30, number=1, traits=["schedule-update"], long=True)
configure_video_settings_for_talks.delay(
world_id, days=30, number=1, traits=["schedule-update"], long=True
)
site_url = settings.SITE_URL
protocol = get_protocol(site_url)
world.domain = "{}://{}".format(protocol, domain_path)
Expand Down

0 comments on commit dc7e1cd

Please sign in to comment.