Skip to content

Commit

Permalink
ENH: Archiver Plugin request timeout (30s -> 7.5s)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdomke committed Aug 28, 2024
1 parent f818482 commit 8ed5865
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pydm/data_plugins/archiver_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Optional

from pydm.widgets.channel import PyDMChannel
from qtpy.QtCore import Slot, QObject, QUrl
from qtpy.QtCore import Slot, QObject, QUrl, QTimer
from qtpy.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
from pydm.data_plugins.plugin import PyDMPlugin, PyDMConnection

Expand Down Expand Up @@ -89,7 +89,9 @@ def fetch_data(self, from_date: float, to_date: float, processing_command: Optio
request = QNetworkRequest(QUrl(url_string))
# This get call is non-blocking, can be made in parallel with others, and when the results are ready they
# will be delivered to the data_request_finished method below via the "finished" signal
self.network_manager.get(request)
self.connection_state_signal.emit(False)
reply = self.network_manager.get(request)
QTimer.singleShot(7500, reply.abort)

@Slot(QNetworkReply)
def data_request_finished(self, reply: QNetworkReply) -> None:
Expand Down

0 comments on commit 8ed5865

Please sign in to comment.