updatescore.py 文件源码

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

项目:BackendAllStars 作者: belatrix 项目源码 文件源码
def handle(self, *args, **options):
        today = datetime.now()

        # Cron tasks
        if today.hour == 0:
            self.change_day()
            self.evaluate_block_users()
            self.send_daily_email()
        if today.day == 1:
            self.change_month()
        if (today.day == 1 and today.month == 1):
            self.change_year()

        # Force actions
        if options['force-day']:
            self.change_day()
            self.evaluate_block_users()
            self.send_daily_email()
        if options['force-month']:
            self.change_month()
        if options['force-year']:
            self.change_year()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号