EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
ce3bebef
Commit
ce3bebef
authored
5 years ago
by
Mussab Abdalla
Browse files
Options
Downloads
Patches
Plain Diff
fixing typo
parent
e4410e06
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
registrar_test.py
+6
-6
6 additions, 6 deletions
registrar_test.py
with
7 additions
and
6 deletions
.gitlab-ci.yml
+
1
−
0
View file @
ce3bebef
...
...
@@ -99,6 +99,7 @@ test:
-
./wait_for_container.sh
-
docker exec -i $(docker ps -qf "name=emg-pvs_registrar") python3 /var/www/pvs/dev/pvs_instance/manage.py storage create pvs_testing pvs_testing --type swift --storage-auth auth-cloud-ovh
-
docker exec -i $(docker ps -qf "name=emg-pvs_registrar") python3 /core/registrar.py --objects-prefix "OA/PH1B/0.1/b9/urn:eop:PHR:MULTISPECTRAL_0.5m:DS_PHR1B_201608070959189_FR1_PX_E012N32_0719_00974_4148/0000/PH1B_PHR_FUS_1A_20160807T095918_20160807T095920_TOU_1234_4148.DIMA.tar"
-
docker service ls
-
pytest -s registrar_test.py --name OA/PH1B/0.1/b9/urn:eop:PHR:MULTISPECTRAL_0.5m:DS_PHR1B_201608070959189_FR1_PX_E012N32_0719_00974_4148/0000/PH1B_PHR_FUS_1A_20160807T095918_20160807T095920_TOU_1234_4148.DIMA.tar
# - docker exec -i $(docker ps -qf "name=emg-pvs_preprocessor") /bin/sh python3 /preprocessor.py Emergency --tar-object-path "/pvs_testing/OA/PH1B/0.2/e8/urn:eop:PHR:MULTISPECTRAL_0.5m:DS_PHR1B_201707271114024_FR1_PX_W006N35_0918_03164_b7e7/0000/PH1B_PHR_FUS__3_20170727T111402_20170727T111407_TOU_1234_b7e7.DIMA.tar" --upload-container preprocessor_test
...
...
This diff is collapsed.
Click to expand it.
registrar_test.py
+
6
−
6
View file @
ce3bebef
...
...
@@ -9,9 +9,9 @@ database = os.environ.get('DB_NAME_DOWNLOAD')
def
connect_to_db
(
eo_id
):
global
db_name
,
coverage_id
connection
=
None
try
:
# connection = psycopg2.connect(dbname=database, user=database_user, password=database_password, host=host, port=port)
connection
=
None
connection
=
psycopg2
.
connect
(
dbname
=
database
,
user
=
database_user
,
password
=
database_password
,
host
=
host
,
port
=
port
)
cursor
=
connection
.
cursor
()
db_name
=
connection
.
get_dsn_parameters
()[
"
dbname
"
]
postgreSQL_select_Query
=
"
SELECT identifier FROM coverages_eoobject WHERE identifier =
'
%s
'
;
"
%
eo_id
...
...
@@ -22,10 +22,10 @@ def connect_to_db(eo_id):
print
(
"
Error while connecting to PostgreSQL
"
,
error
)
finally
:
#closing database connection.
if
(
connection
)
:
cursor
.
close
()
connection
.
close
()
print
(
"
PostgreSQL connection is closed
"
)
if
connection
:
cursor
.
close
()
connection
.
close
()
print
(
"
PostgreSQL connection is closed
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment