From a4bfe0d557d219a14c7f2991e5f5d5b07e463ce6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Jun 2021 20:57:24 +0000 Subject: [PATCH 1/2] Bump pillow from 8.1.1 to 8.2.0 in /manager Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.1.1 to 8.2.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/8.1.1...8.2.0) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- manager/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/requirements.txt b/manager/requirements.txt index 5511c6a3..29efa822 100644 --- a/manager/requirements.txt +++ b/manager/requirements.txt @@ -47,7 +47,7 @@ more-itertools==8.2.0 msgpack==1.0.0 numpy==1.18.1 packaging==20.3 -Pillow==8.1.1 +Pillow==8.2.0 pip-licenses==2.1.1 pluggy==0.13.1 psycopg2==2.8.4 From 549ded1ac77877df182ab8cf73ef02d1ce65a616 Mon Sep 17 00:00:00 2001 From: sebastian-aranda Date: Mon, 19 Jul 2021 14:29:27 -0400 Subject: [PATCH 2/2] Remove deprecated heartbeat function --- manager/subscription/consumers.py | 42 ------------------------------- 1 file changed, 42 deletions(-) diff --git a/manager/subscription/consumers.py b/manager/subscription/consumers.py index 6d4c0e71..3cc60f05 100644 --- a/manager/subscription/consumers.py +++ b/manager/subscription/consumers.py @@ -2,10 +2,8 @@ import json import asyncio -import datetime from astropy.time import Time -# from channels.db import database_sync_to_async from channels.generic.websocket import AsyncJsonWebsocketConsumer from django.conf import settings @@ -66,9 +64,6 @@ async def receive_json(self, message): await self.handle_subscription_message(message) elif "action" in message: await self.handle_action_message(message) - # DEPRECATED: now heartbeats are received from event callbacks - elif "heartbeat" in message: - await self.handle_heartbeat_message(message) else: await self.handle_data_message(message, manager_rcv) @@ -172,31 +167,6 @@ async def handle_action_message(self, message): time_data = utils.get_times() await self.send_json({"time_data": time_data, "request_time": request_time}) - # DEPRECATED: now heartbeats are handled using SALobj events callbacks - async def handle_heartbeat_message(self, message): - """Handle a heartbeat message. - - Receives a heartbeat message and sets it in the heartbeat manager. - - Parameters - ---------- - message: `dict` - dictionary containing the message parsed as json. The expected format of the message is as follows: - - .. code-block:: json - - { - "heartbeat": "", - "timestamp": " (optional)" - } - """ - timestamp = ( - message["timestamp"] - if "timestamp" in message - else datetime.datetime.now().timestamp() - ) - self.heartbeat_manager.set_heartbeat_timestamp(message["heartbeat"], timestamp) - async def handle_data_message(self, message, manager_rcv): """Handle a data message. @@ -228,18 +198,6 @@ async def handle_data_message(self, message, manager_rcv): }] } """ - # setting heartbeat - if message["data"][0]["csc"] == "Heartbeat": - heartbeat_message = message["data"][0]["data"]["stream"] - timestamp = ( - heartbeat_message["last_heartbeat_timestamp"] - if "last_heartbeat_timestamp" in heartbeat_message - else datetime.datetime.now().timestamp() - ) - self.heartbeat_manager.set_heartbeat_timestamp( - heartbeat_message["csc"], timestamp - ) - data = message["data"] category = message["category"] producer_snd = message["producer_snd"] if "producer_snd" in message else None