コード例 #1
0
ファイル: genvmapaudits.py プロジェクト: chintal/tendril
def run(vobj=None):
    from tendril.sourcing.map import export_vendor_map_audit
    from tendril.sourcing.electronics import vendor_list

    if not vobj:
        for v in vendor_list:
            export_vendor_map_audit(v)
    else:
        export_vendor_map_audit(vobj)
コード例 #2
0
ファイル: vendors.py プロジェクト: chintal/tendril
def profile_vendor_genvmapaudit(vobj, name):
    """
    This function profiles vendor map audit file generation for the given
    vendor. This no longer corresponds to the execution profile for
    retrieving a part from the vendor, since the data may be retrieved from
    the database.

    .. warning::
        Make sure that your cache already includes all the necessary files
        by first running the ``tendril-genvmapaudits`` script before running
        the profiler.

    """
    map.export_vendor_map_audit(vobj)
コード例 #3
0
def profile_vendor_genvmapaudit(vobj, name):
    """
    This function profiles vendor map audit file generation for the given
    vendor. This no longer corresponds to the execution profile for
    retrieving a part from the vendor, since the data may be retrieved from
    the database.

    .. warning::
        Make sure that your cache already includes all the necessary files
        by first running the ``tendril-genvmapaudits`` script before running
        the profiler.

    """
    map.export_vendor_map_audit(vobj)
コード例 #4
0
def run(vobj=None, force=False, lazy=False):
    from tendril.sourcing.map import export_vendor_map_audit
    from tendril.sourcing.electronics import vendor_list

    maxage = -1

    if force is True:
        maxage = 0

    if lazy is True:
        maxage = -1

    if not vobj:
        for v in vendor_list:
            export_vendor_map_audit(v, maxage)
    else:
        export_vendor_map_audit(vobj, maxage)