diff --git a/lemarche/siaes/management/commands/sync_with_emplois_inclusion.py b/lemarche/siaes/management/commands/sync_with_emplois_inclusion.py index c74639b35..6c711c839 100644 --- a/lemarche/siaes/management/commands/sync_with_emplois_inclusion.py +++ b/lemarche/siaes/management/commands/sync_with_emplois_inclusion.py @@ -211,7 +211,7 @@ def c1_export(self): # noqa C901 return c1_list_cleaned except Exception as e: api_slack.send_message_to_channel("Erreur lors de la synchronisation emplois <-> marché") - self.stdout_error(e) + self.stdout_error(str(e)) raise Exception(e) def filter_c1_export(self, c1_list): diff --git a/lemarche/utils/apis/api_emplois_inclusion.py b/lemarche/utils/apis/api_emplois_inclusion.py index 3c1cbe9f1..fa8aa4a01 100644 --- a/lemarche/utils/apis/api_emplois_inclusion.py +++ b/lemarche/utils/apis/api_emplois_inclusion.py @@ -1,4 +1,5 @@ import logging +import time import requests from django.conf import settings @@ -26,6 +27,7 @@ def get_siae_list(): siae_list.append(siae) if data["next"]: pagination += 1 + time.sleep(1) else: break