Commit 157a7c1f authored by Charlie Jacomme's avatar Charlie Jacomme

[impression] ./manage.py refresh_printer_jobs

On refresh les jobs de l'imprimante avec une commande.
Plus de refresh automatique lors du chargement.
parent d7c97ef9
from django.core.management.base import BaseCommand, CommandError
from apps.impressions.models import Jobs
class Command(BaseCommand):
help = 'Rafrachit les jobs de l\' imprimante'
def handle(self, *args, **options):
try:
Jobs.objects.sync_jobs()
except URLError:
pass
......@@ -286,11 +286,6 @@ def gestion(request):
imprimante_jobs = []
lpq_jobs = []
# on synchronise les jobs django avec les jobs de l'imprimante
try:
Jobs.objects.sync_jobs()
except URLError:
pass
if not is_imprimeur(request):
# On peuple avec les logins clubs de l'adh
logins = [ unicode(cl[0]) for cl in get_club(request)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment