def _make_scheduled_jobs(context, data_dict): data_dict = {'only_to_run': True, 'only_active': True} sources = _get_sources_for_user(context, data_dict) for source in sources: data_dict = {'source_id': source.id, 'run': True} try: get_action('harvest_job_create')(context, data_dict) except HarvestJobExists: log.info('Trying to rerun job for %s skipping', source.id) source.next_run = _calculate_next_run(source.frequency) source.save()
def _make_scheduled_jobs(context, data_dict): data_dict = {"only_to_run": True, "only_active": True} sources = _get_sources_for_user(context, data_dict) for source in sources: data_dict = {"source_id": source.id} try: get_action("harvest_job_create")(context, data_dict) except HarvestJobExists, e: log.info("Trying to rerun job for %s skipping" % source.id) source.next_run = _caluclate_next_run(source.frequency) source.save()