Skip to content

Commit

Permalink
Fix error display. Add sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Dec 18, 2023
1 parent 7408488 commit 652a1fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions lemarche/utils/apis/api_emplois_inclusion.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import time

import requests
from django.conf import settings
Expand Down Expand Up @@ -26,6 +27,7 @@ def get_siae_list():
siae_list.append(siae)
if data["next"]:
pagination += 1
time.sleep(1)
else:
break

Expand Down

0 comments on commit 652a1fa

Please sign in to comment.