#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
__title__ = '测试类'

@Time    : 2020/9/24 19:44
@Author  : Kenny-PC
@Software: PyCharm

# code is far away from bugs with the god animal protecting
    I love animals. They taste delicious.
              ┏┓      ┏┓
            ┏┛┻━━━┛┻┓
            ┃      ☃      ┃
            ┃  ┳┛  ┗┳  ┃
            ┃      ┻      ┃
            ┗━┓      ┏━┛
                ┃      ┗━━━┓
                ┃  神兽保佑    ┣┓
                ┃ 永无BUG!   ┏┛
                ┗┓┓┏━┳┓┏┛
                  ┃┫┫  ┃┫┫
                  ┗┻┛  ┗┻┛
"""

from util.LoggerService import LoggerService
# import account_list as al
from util import date_util


def start_order_job(log):
    log.info('start_order_job')


start_order_time = '2020-09-21 16:05:00'
start_cost_time = '2020-09-21 16:35:00'
a = 10817

if __name__ == '__main__':
    log = LoggerService.logger_file('../test.log', 'abcd')

    st_unix = date_util.getYesterdayStartTime()
    et_unix = date_util.getTodayStartTime()

    et_unix = 1601136000
    et_unix = 1601139600

    print(1.4)
    print(int(1.4))
    for i in range(int((et_unix - st_unix) // 86400)):
        print('i', i)

    for i in range((et_unix - st_unix) // 86400):
        print('i', i)

    # sql = "select * from quchen_text.order where date=1601136000 and platform = '悠书阁'"
    # connect = MySQLConnection()
    # try:
    #     page = 1
    #     size = 50
    #     pagination = connect.listByPage(sql, page, size)
    #     print(pagination)
    # except Exception as e:
    #     log.exception(e)
    # finally:
    #     # 关闭数据库连接
    #     connect.close()

    # scheduler = BlockingScheduler()
    #
    # #每天凌晨执行
    # #start_job_time = '2020-09-26 03:05:00'
    # # scheduler.add_job(start_all_job, 'interval', days=1, start_date=start_job_time)
    #
    # #每天凌晨3点到4点的30分钟都执行一次
    # scheduler.add_job(start_all_job, 'cron', hour='3-4', minute='35')
    #
    # # 每10秒执行一次
    # #scheduler.add_job(start_all_job, 'interval', seconds=2)
    #
    # scheduler.start()