|
@@ -373,9 +373,11 @@ class CronCollectDataView(View):
|
|
|
@staticmethod
|
|
|
def collect_play_back(response):
|
|
|
try:
|
|
|
- end_time = int(time.time())
|
|
|
- start_time = end_time - 24 * 60 * 60 # 每天执行一次
|
|
|
today = datetime.datetime.today()
|
|
|
+ start_time = datetime.datetime(today.year, today.month, today.day)
|
|
|
+ end_time = start_time + datetime.timedelta(days=1)
|
|
|
+ start_time = CommonService.str_to_timestamp(start_time.strftime('%Y-%m-%d %H:%M:%S'))
|
|
|
+ end_time = CommonService.str_to_timestamp(end_time.strftime('%Y-%m-%d %H:%M:%S'))
|
|
|
this_month_str = datetime.datetime(today.year, today.month, 1)
|
|
|
this_month_stamp = CommonService.str_to_timestamp(this_month_str.strftime('%Y-%m-%d %H:%M:%S'))
|
|
|
video_play_back_time_qs = VideoPlaybackTimeModel.objects.filter(startTime__gte=start_time,
|