##// END OF EJS Templates
Log AMDA get url of the file and the download file
perrinel -
r440:d41ecc82f0a0
parent child
Show More
@@ -26,7 +26,7 const auto AMDA_URL_FORMAT = QStringLiteral(
26 "timeFormat=ISO8601&gzip=0");
26 "timeFormat=ISO8601&gzip=0");
27
27
28 /// Dates format passed in the URL (e.g 2013-09-23T09:00)
28 /// Dates format passed in the URL (e.g 2013-09-23T09:00)
29 const auto AMDA_TIME_FORMAT = QStringLiteral("yyyy-MM-ddThh:ss");
29 const auto AMDA_TIME_FORMAT = QStringLiteral("yyyy-MM-ddThh:mm:ss");
30
30
31 /// Formats a time to a date that can be passed in URL
31 /// Formats a time to a date that can be passed in URL
32 QString dateFormat(double sqpDateTime) noexcept
32 QString dateFormat(double sqpDateTime) noexcept
@@ -81,6 +81,7 void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const
81 qCCritical(LOG_AmdaProvider()) << tr("Can't retrieve data: unknown product id");
81 qCCritical(LOG_AmdaProvider()) << tr("Can't retrieve data: unknown product id");
82 return;
82 return;
83 }
83 }
84 qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData") << dateTime;
84
85
85 // /////////// //
86 // /////////// //
86 // Creates URL //
87 // Creates URL //
@@ -90,7 +91,7 void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const
90 auto endDate = dateFormat(dateTime.m_TEnd);
91 auto endDate = dateFormat(dateTime.m_TEnd);
91
92
92 auto url = QUrl{QString{AMDA_URL_FORMAT}.arg(startDate, endDate, productId)};
93 auto url = QUrl{QString{AMDA_URL_FORMAT}.arg(startDate, endDate, productId)};
93
94 qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData url:") << url;
94 auto tempFile = std::make_shared<QTemporaryFile>();
95 auto tempFile = std::make_shared<QTemporaryFile>();
95
96
96 // LAMBDA
97 // LAMBDA
@@ -127,6 +128,8 void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const
127 auto downloadFileUrl = QUrl{QString{reply->readAll()}};
128 auto downloadFileUrl = QUrl{QString{reply->readAll()}};
128
129
129
130
131 qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData downloadFileUrl:")
132 << downloadFileUrl;
130 // Executes request for downloading file //
133 // Executes request for downloading file //
131
134
132 // Creates destination file
135 // Creates destination file
General Comments 0
You need to be logged in to leave comments. Login now