Skip to content

Commit

Permalink
fix(API): Réparer le script de synchro avec les emplois (#1023)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Jan 8, 2024
1 parent 858868b commit ad4e86e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def upload_users_to_db_stats(self, users_list):
try:
return StatsUser.objects.bulk_create(stats_users_list, batch_size=50)
except IntegrityError as e:
self.stdout_error(e)
self.stdout_error(str(e))

def clean_stats_users(self):
count_delete, _ = StatsUser.objects.all().delete()
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 ad4e86e

Please sign in to comment.