dbimport.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:automated-reporting 作者: Waikato 项目源码 文件源码
def queue_import_grade_results(year, csv, isgzip, encoding, email=None):
    """
    Queues the import of the grade results for a specific year (Brio/Hyperion export).

    :param year: the year to import the results for (eg 2015)
    :type year: int
    :param csv: the CSV file to import, can be gzip compressed
    :type csv: str
    :param isgzip: true if GZIP compressed
    :type isgzip: bool
    :param encoding: the file encoding (eg utf-8)
    :type encoding: str
    :param email: the (optional) email address to send a notification to
    :type email: str
    """

    update_tablestatus(GradeResults._meta.db_table, "Importing...")
    msg = import_grade_results(year, csv, isgzip, encoding, email=email)
    # query date from import is used when current year
    if (msg is not None) or (datetime.today().year != year):
        update_tablestatus(GradeResults._meta.db_table, msg=msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号