# let the index catch up time.sleep(2) rows = [] # longest_row = 0 # now go through all the journals, and consider their related applications counter = 0 for result in esprit.tasks.scroll(conn, "journal", keepalive="1m"): counter += 1 journal = Journal(**result) journal.remove_related_applications() # find all the applications that have this journal as a related_journal # this query returns them ordered oldest first applications = Suggestion.find_all_by_related_journal(journal.id) if len(applications) > 0: for application in applications: row = [ journal.id, journal.created_date, journal.data.get("last_reapplication", ""), application.id, application.application_status, application.created_date ] if application.application_status != "accepted": row += ["", "no", "application is not in status 'accepted'"] rows.append(row) continue date_accepted = None
# let the index catch up time.sleep(2) rows = [] # longest_row = 0 # now go through all the journals, and consider their related applications counter = 0 for result in esprit.tasks.scroll(conn, "journal", keepalive="1m"): counter += 1 journal = Journal(**result) journal.remove_related_applications() # find all the applications that have this journal as a related_journal # this query returns them ordered oldest first applications = Suggestion.find_all_by_related_journal(journal.id) if len(applications) > 0: for application in applications: row = [ journal.id, journal.created_date, journal.data.get("last_reapplication", ""), application.id, application.application_status, application.created_date ] if application.application_status != "accepted": row += ["", "no", "application is not in status 'accepted'"] rows.append(row) continue date_accepted = None acreated = application.created_timestamp