コード例 #1
0
def get_product_broken_time(prid, **kwargs):
    begin = kwargs['begin']
    if begin is None:
        begin = 0
    end = kwargs['end']
    if end is None:
        end = calendar.timegm(datetime.now().timetuple())

    return {}, [sum([store.get_broken_time(rid, begin=begin, end=end) for rid in store.get_product_repositories(prid)])]