import os import sys import datetime sys.path.append(os.getcwd()) from datetime import datetime from common import MysqlHelper, Common from video_stitching.video_stitching import VideoStitching def get_account_id(): current_time = datetime.now() formatted_time = current_time.strftime("%Y-%m-%d") count = f"""SELECT COUNT(*) AS total_count FROM ( SELECT audio, account_id FROM video_audio WHERE time = '{formatted_time}' GROUP BY audio, account_id) AS subquery;""" count = MysqlHelper.get_values(count, "prod") return count if __name__ == '__main__': count = get_account_id() count = str(count).replace('(', '').replace(')', '').replace(',', '') if int(count) < 20: Common.logger().info("开始执行") VideoStitching.video_stitching()