Skip to content

Commit 3240153

Browse files
Generalized database connection in Batch jobs
1 parent 7cc7535 commit 3240153

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

calcus/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
}
227227
}
228228

229-
if not IS_TEST:
229+
if not IS_TEST and IS_CLOUD:
230230
DATABASES["default"]["OPTIONS"] = {"sslmode": "require"}
231231

232232
# In Cloud mode, we need to constantly query the database to check if the

frontend/cloud_job.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def create_container_job(calc, nproc, timeout):
120120
"POSTGRES_HOST": os.environ.get(
121121
"COMPUTE_POSTGRES_HOST", settings.POSTGRES_HOST
122122
),
123+
"POSTGRES_PORT": settings.POSTGRES_PORT,
123124
"CALCUS_COMPUTE": "True",
124125
"CALCUS_CLOUD": "True",
125126
"NUM_CPU": str(nproc),

frontend/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3239,7 +3239,7 @@ def parse_orca_charges(calc, s):
32393239
if len(xyz) < 2: # Monoatomic
32403240
return
32413241

3242-
parse_default_orca_charges(calc, s)
3242+
# parse_default_orca_charges(calc, s)
32433243

32443244
if calc.parameters.specifications.lower().replace("_", "").find("hirshfeld") != -1:
32453245
parse_hirshfeld_orca_charges(calc, s)

0 commit comments

Comments
 (0)