parent
494de017bb
commit
6ff2ff0b58
@ -301,8 +301,9 @@ def run_all_recurrent_imports_failed(self):
|
|||||||
|
|
||||||
logger.info("Run only failed imports")
|
logger.info("Run only failed imports")
|
||||||
imports = RecurrentImport.objects.all().order_by("pk")
|
imports = RecurrentImport.objects.all().order_by("pk")
|
||||||
|
imports = [(imp.pk, imp.last_import()) for imp in imports]
|
||||||
|
|
||||||
run_recurrent_imports_from_list([imp.pk for imp in imports if imp.last_import().status == BatchImportation.STATUS.FAILED])
|
run_recurrent_imports_from_list([imp[0] for imp in imports if (not imp[1] is None) and imp[1].status == BatchImportation.STATUS.FAILED])
|
||||||
|
|
||||||
@app.task(bind=True)
|
@app.task(bind=True)
|
||||||
def run_all_recurrent_imports_canceled(self):
|
def run_all_recurrent_imports_canceled(self):
|
||||||
@ -310,8 +311,9 @@ def run_all_recurrent_imports_canceled(self):
|
|||||||
|
|
||||||
logger.info("Run only canceled imports")
|
logger.info("Run only canceled imports")
|
||||||
imports = RecurrentImport.objects.all().order_by("pk")
|
imports = RecurrentImport.objects.all().order_by("pk")
|
||||||
|
imports = [(imp.pk, imp.last_import()) for imp in imports]
|
||||||
|
|
||||||
run_recurrent_imports_from_list([imp.pk for imp in imports if imp.last_import().status == BatchImportation.STATUS.CANCELED])
|
run_recurrent_imports_from_list([imp[0] for imp in imports if (not imp[1] is None) and imp[1].status == BatchImportation.STATUS.CANCELED])
|
||||||
|
|
||||||
|
|
||||||
@app.task(bind=True)
|
@app.task(bind=True)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<a href="{% url 'run_all_rimports' %}" role="button">Exécuter tout {% picto_from_name "play-circle" %}</a>
|
<a href="{% url 'run_all_rimports' %}" role="button">Exécuter tout {% picto_from_name "play-circle" %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if status == "failed" or status == "canceled" %}
|
{% if status == "failed" or status == "canceled" %}
|
||||||
<a href="{% url 'run_all_rimports_status' status %}" role="button">Relancer les imports échoués {% picto_from_name "play-circle" %}</a>
|
<a href="{% url 'run_all_rimports_status' status %}" role="button">Relancer les imports {% if status == "failed" %}échoués{% else %}annulés{% endif %} {% picto_from_name "play-circle" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'add_rimport'%}" role="button">Ajouter {% picto_from_name "plus-circle" %}</a>
|
<a href="{% url 'add_rimport'%}" role="button">Ajouter {% picto_from_name "plus-circle" %}</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user