Skip to content

Commit 546018e

Browse files
committed
updated back end
1 parent 16c3b32 commit 546018e

File tree

5 files changed

+156
-73
lines changed

5 files changed

+156
-73
lines changed

services/data/data/dependencies/csw.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ def get_file_paths(self, product: str, bbox: list, start: str, end: str, timesta
183183
start {str} -- The start date of the temporal extent
184184
end {str} -- The end date of the temporal extent
185185
timestamp {str} -- The timestamp of the data version, filters by data that was available at that time.
186-
updated {bool} -- If true it simulates that one file got updated.
187-
deleted {bool} -- If false it Simulates that one file got deleted.
186+
updated {bool} -- If true it simulates that one file got updated - deprecated.
187+
deleted {bool} -- If false it Simulates that one file got deleted - deprecated.
188188
Returns:
189189
list -- The records data
190190
"""
@@ -225,18 +225,18 @@ def get_file_paths(self, product: str, bbox: list, start: str, end: str, timesta
225225
)
226226
)
227227
else:
228-
logging.info("Ignored first file")
228+
logging.info("Ignored first file: {}".format(name))
229229
else:
230-
logging.info("{} > {}".format(data_timestamp,timestamp))
230+
logging.info("{} > {} : {}".format(data_timestamp, timestamp, name))
231231

232232
if updated and first:
233233
path = path + "_new"
234234
name = name + "_new"
235235

236-
date_data_timestamp = datetime.strptime(updated, '%Y-%m-%d %H:%M:%S.%f')
236+
date_data_timestamp = datetime.strptime(updated, "%Y-%m-%d %H:%M:%S.%f")
237237

238238
if date_data_timestamp <= date_filter_timestamp:
239-
logging.info("FIRST: Appended additional file")
239+
logging.info("FIRST: Appended additional file: {}".format(name))
240240
response.append(
241241
FilePath(
242242
date=date,
@@ -245,7 +245,7 @@ def get_file_paths(self, product: str, bbox: list, start: str, end: str, timesta
245245
timestamp=data_timestamp
246246
))
247247
else:
248-
logging.info("FIRST: {} > {}".format(data_timestamp, timestamp))
248+
logging.info("FIRST: Not Appending {} > {} : {}".format(date_data_timestamp.strftime("%Y-%m-%d %H:%M:%S.%f"), date_filter_timestamp.strftime("%Y-%m-%d %H:%M:%S.%f"), name))
249249

250250
first = False
251251

services/jobs/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
FROM alpine:3.7
22

33
RUN mkdir -p /usr/src/app
4+
RUN mkdir -p /usr/src/app/results
45
WORKDIR /usr/src/app
56

67
COPY requirements.txt .
78

89
RUN apk update && \
9-
apk add build-base libressl-dev libffi-dev gcc python3-dev musl-dev postgresql-dev git && \
10+
apk add build-base libressl-dev libffi-dev gcc python3-dev musl-dev postgresql-dev git jpeg-dev zlib-dev && \
1011
pip3 install --upgrade pip && \
1112
python3 -m pip install -r requirements.txt --no-cache-dir && \
1213
git clone https://github.com/bgoesswein/implementation_backend.git && \
13-
chmod 777 -R implementation_backend
14+
chmod 777 -R implementation_backend && \
15+
chmod 777 -R results
1416

1517
ADD . /usr/src/app
1618

services/jobs/jobs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ wincertstore==0.2
3333
wrapt==1.10.11
3434
pytz==2018.7
3535
GitPython==2.1.11
36-
numpy==1.16.2
36+
numpy==1.16.2
37+
pil

0 commit comments

Comments
 (0)