from django_cron import CronJobBase, Schedule
from Application.populate import populate_rss
from Application.queries import all_feeds_link


class cron_update_rss(CronJobBase):
    RUN_EVERY_MINS = 60 # every 1 hours
    RETRY_AFTER_FAILURE_MINS = 5

    schedule = Schedule(run_every_mins=RUN_EVERY_MINS, retry_after_failure_mins=RETRY_AFTER_FAILURE_MINS)
    code = 'cron.cron_update_rss'    # a unique code

    def do(self):
        print("Actualizando entradas")
        for link in all_feeds_link():
            try:
                populate_rss(link['link'], printer=True)
                #update_rss(ide['id'], printer=True)
            except:
                print("Error de cron: ")

@@ -132,16 +132,51 @@
 ds_link%0A
+from django.core import management%0A
 %0A%0Aclass 
@@ -721,9 +721,128 @@
 cron
-: 
+%22)%0A%0A        try:%0A            management.call_command('update_index')%0A        except:%0A            print(%22Error de haystack
 %22)%0A

Fix #21: Añadida a tarea de actualizar las entradas la de actualizar el índice.