diff --git a/app/apps/main/tasks.py b/app/apps/main/tasks.py index 8805bd5..4c741e8 100644 --- a/app/apps/main/tasks.py +++ b/app/apps/main/tasks.py @@ -47,7 +47,7 @@ def create_start_shift_worktime(): scales_data = get_scales_data_from_redis() now_date = DashboardBaseService.get_current_time() shift_start = DashboardBaseService.get_shift_start(now_date) - delta = (now_date - scales_data['date']).seconds / 60 + delta = (now_date - scales_data['date']).total_seconds() / 60 try: latest_worktime_obj = FabricWorkTime.objects.latest('time') @@ -75,7 +75,7 @@ def create_worktime_data(): now_date = DashboardBaseService.get_current_time() obj_from_redis = get_scales_data_from_redis(get_settings('control_conveyor')) - delta = (now_date - obj_from_redis['date']).seconds / 60 + delta = (now_date - obj_from_redis['date']).total_seconds() / 60 try: latest_worktime_obj = FabricWorkTime.objects.latest('time')