Converting this over to using Postgres. See the new postgres directory for a docker container to spin this up. Tests and development databases are the same, will try and get this corrected at some point.
This commit is contained in:
parent
098ecb3e87
commit
37df0bf8f4
2
Pipfile
2
Pipfile
|
@ -30,6 +30,8 @@ alembic = "*"
|
|||
coverage = "*"
|
||||
sphinx = "*"
|
||||
recommonmark = "*"
|
||||
psycopg2 = "*"
|
||||
psycopg2-binary = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.7"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "19524c5a1c1769fc63c846976c64ea1f4a4610f4e895f61cc315c7d2bcacc504"
|
||||
"sha256": "32eb2d02f21e83658d1c07484179af7f952f8772c41a52275d67e92fc2c5768c"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -91,10 +91,10 @@
|
|||
},
|
||||
"billiard": {
|
||||
"hashes": [
|
||||
"sha256:01afcb4e7c4fd6480940cfbd4d9edc19d7a7509d6ada533984d0d0f49901ec82",
|
||||
"sha256:b8809c74f648dfe69b973c8e660bcec00603758c9db8ba89d7719f88d5f01f26"
|
||||
"sha256:26fd494dc3251f8ce1f5559744f18aeed427fdaf29a75d7baae26752a5d3816f",
|
||||
"sha256:f4e09366653aa3cb3ae8ed16423f9ba1665ff426f087bcdbbed86bf3664fe02c"
|
||||
],
|
||||
"version": "==3.6.1.0"
|
||||
"version": "==3.6.2.0"
|
||||
},
|
||||
"celery": {
|
||||
"hashes": [
|
||||
|
@ -460,11 +460,11 @@
|
|||
},
|
||||
"marshmallow": {
|
||||
"hashes": [
|
||||
"sha256:0ba81b6da4ae69eb229b74b3c741ff13fe04fb899824377b1aff5aaa1a9fd46e",
|
||||
"sha256:3e53dd9e9358977a3929e45cdbe4a671f9eff53a7d6a23f33ed3eab8c1890d8f"
|
||||
"sha256:7669b944d6233b81f68739d5826f1176c3841cc31cf6b856841083b5a72f5ca9",
|
||||
"sha256:c9d277f6092f32300395fb83d343be9f61b5e99d66d22bae1e5e7cd82608fee6"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.3.0"
|
||||
"version": "==3.4.0"
|
||||
},
|
||||
"marshmallow-enum": {
|
||||
"hashes": [
|
||||
|
@ -504,6 +504,63 @@
|
|||
],
|
||||
"version": "==20.1"
|
||||
},
|
||||
"psycopg2": {
|
||||
"hashes": [
|
||||
"sha256:4212ca404c4445dc5746c0d68db27d2cbfb87b523fe233dc84ecd24062e35677",
|
||||
"sha256:47fc642bf6f427805daf52d6e52619fe0637648fe27017062d898f3bf891419d",
|
||||
"sha256:72772181d9bad1fa349792a1e7384dde56742c14af2b9986013eb94a240f005b",
|
||||
"sha256:8396be6e5ff844282d4d49b81631772f80dabae5658d432202faf101f5283b7c",
|
||||
"sha256:893c11064b347b24ecdd277a094413e1954f8a4e8cdaf7ffbe7ca3db87c103f0",
|
||||
"sha256:92a07dfd4d7c325dd177548c4134052d4842222833576c8391aab6f74038fc3f",
|
||||
"sha256:965c4c93e33e6984d8031f74e51227bd755376a9df6993774fd5b6fb3288b1f4",
|
||||
"sha256:9ab75e0b2820880ae24b7136c4d230383e07db014456a476d096591172569c38",
|
||||
"sha256:b0845e3bdd4aa18dc2f9b6fb78fbd3d9d371ad167fd6d1b7ad01c0a6cdad4fc6",
|
||||
"sha256:dca2d7203f0dfce8ea4b3efd668f8ea65cd2b35112638e488a4c12594015f67b",
|
||||
"sha256:ed686e5926929887e2c7ae0a700e32c6129abb798b4ad2b846e933de21508151",
|
||||
"sha256:ef6df7e14698e79c59c7ee7cf94cd62e5b869db369ed4b1b8f7b729ea825712a",
|
||||
"sha256:f898e5cc0a662a9e12bde6f931263a1bbd350cfb18e1d5336a12927851825bb6"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.8.4"
|
||||
},
|
||||
"psycopg2-binary": {
|
||||
"hashes": [
|
||||
"sha256:040234f8a4a8dfd692662a8308d78f63f31a97e1c42d2480e5e6810c48966a29",
|
||||
"sha256:086f7e89ec85a6704db51f68f0dcae432eff9300809723a6e8782c41c2f48e03",
|
||||
"sha256:18ca813fdb17bc1db73fe61b196b05dd1ca2165b884dd5ec5568877cabf9b039",
|
||||
"sha256:19dc39616850342a2a6db70559af55b22955f86667b5f652f40c0e99253d9881",
|
||||
"sha256:2166e770cb98f02ed5ee2b0b569d40db26788e0bf2ec3ae1a0d864ea6f1d8309",
|
||||
"sha256:3a2522b1d9178575acee4adf8fd9f979f9c0449b00b4164bb63c3475ea6528ed",
|
||||
"sha256:3aa773580f85a28ffdf6f862e59cb5a3cc7ef6885121f2de3fca8d6ada4dbf3b",
|
||||
"sha256:3b5deaa3ee7180585a296af33e14c9b18c218d148e735c7accf78130765a47e3",
|
||||
"sha256:407af6d7e46593415f216c7f56ba087a9a42bd6dc2ecb86028760aa45b802bd7",
|
||||
"sha256:4c3c09fb674401f630626310bcaf6cd6285daf0d5e4c26d6e55ca26a2734e39b",
|
||||
"sha256:4c6717962247445b4f9e21c962ea61d2e884fc17df5ddf5e35863b016f8a1f03",
|
||||
"sha256:50446fae5681fc99f87e505d4e77c9407e683ab60c555ec302f9ac9bffa61103",
|
||||
"sha256:5057669b6a66aa9ca118a2a860159f0ee3acf837eda937bdd2a64f3431361a2d",
|
||||
"sha256:5dd90c5438b4f935c9d01fcbad3620253da89d19c1f5fca9158646407ed7df35",
|
||||
"sha256:659c815b5b8e2a55193ede2795c1e2349b8011497310bb936da7d4745652823b",
|
||||
"sha256:69b13fdf12878b10dc6003acc8d0abf3ad93e79813fd5f3812497c1c9fb9be49",
|
||||
"sha256:7a1cb80e35e1ccea3e11a48afe65d38744a0e0bde88795cc56a4d05b6e4f9d70",
|
||||
"sha256:7e6e3c52e6732c219c07bd97fff6c088f8df4dae3b79752ee3a817e6f32e177e",
|
||||
"sha256:7f42a8490c4fe854325504ce7a6e4796b207960dabb2cbafe3c3959cb00d1d7e",
|
||||
"sha256:84156313f258eafff716b2961644a4483a9be44a5d43551d554844d15d4d224e",
|
||||
"sha256:8578d6b8192e4c805e85f187bc530d0f52ba86c39172e61cd51f68fddd648103",
|
||||
"sha256:890167d5091279a27e2505ff0e1fb273f8c48c41d35c5b92adbf4af80e6b2ed6",
|
||||
"sha256:98e10634792ac0e9e7a92a76b4991b44c2325d3e7798270a808407355e7bb0a1",
|
||||
"sha256:9aadff9032e967865f9778485571e93908d27dab21d0fdfdec0ca779bb6f8ad9",
|
||||
"sha256:9f24f383a298a0c0f9b3113b982e21751a8ecde6615494a3f1470eb4a9d70e9e",
|
||||
"sha256:a73021b44813b5c84eda4a3af5826dd72356a900bac9bd9dd1f0f81ee1c22c2f",
|
||||
"sha256:afd96845e12638d2c44d213d4810a08f4dc4a563f9a98204b7428e567014b1cd",
|
||||
"sha256:b73ddf033d8cd4cc9dfed6324b1ad2a89ba52c410ef6877998422fcb9c23e3a8",
|
||||
"sha256:b8f490f5fad1767a1331df1259763b3bad7d7af12a75b950c2843ba319b2415f",
|
||||
"sha256:dbc5cd56fff1a6152ca59445178652756f4e509f672e49ccdf3d79c1043113a4",
|
||||
"sha256:eac8a3499754790187bb00574ab980df13e754777d346f85e0ff6df929bcd964",
|
||||
"sha256:eaed1c65f461a959284649e37b5051224f4db6ebdc84e40b5e65f2986f101a08"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.8.4"
|
||||
},
|
||||
"pycparser": {
|
||||
"hashes": [
|
||||
"sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"
|
||||
|
@ -699,10 +756,10 @@
|
|||
},
|
||||
"waitress": {
|
||||
"hashes": [
|
||||
"sha256:67a60a376f0eb335ed88967c42b73983a58d66a2a72eb9009a42725f7453b142",
|
||||
"sha256:cbf1c62fc41393a6f27cb78483f8f6e252630a3598984668244b7bf4e35856f1"
|
||||
"sha256:045b3efc3d97c93362173ab1dfc159b52cfa22b46c3334ffc805dbdbf0e4309e",
|
||||
"sha256:77ff3f3226931a1d7d8624c5371de07c8e90c7e5d80c5cc660d72659aaf23f38"
|
||||
],
|
||||
"version": "==1.4.2"
|
||||
"version": "==1.4.3"
|
||||
},
|
||||
"webob": {
|
||||
"hashes": [
|
||||
|
|
|
@ -4,4 +4,4 @@ basedir = os.path.abspath(os.path.dirname(__file__))
|
|||
NAME = "CR Connect Workflow"
|
||||
CORS_ENABLED = False
|
||||
DEVELOPMENT = True
|
||||
SQLALCHEMY_DATABASE_URI = "sqlite:////" + os.path.join(basedir, "cr_connect.db")
|
||||
SQLALCHEMY_DATABASE_URI = "postgresql://postgres:docker@localhost/crc"
|
||||
|
|
|
@ -5,4 +5,4 @@ NAME = "CR Connect Workflow"
|
|||
CORS_ENABLED = False
|
||||
DEVELOPMENT = True
|
||||
TESTING = True
|
||||
SQLALCHEMY_DATABASE_URI = "sqlite:////" + os.path.join(basedir, "test.db")
|
||||
SQLALCHEMY_DATABASE_URI = "postgresql://postgres:docker@localhost/postgres"
|
||||
|
|
|
@ -51,6 +51,12 @@ class ExampleDataLoader:
|
|||
name="parallel_tasks",
|
||||
display_name="Parallel tasks",
|
||||
description='Four tasks that can happen simultaneously')
|
||||
workflow_specifications += \
|
||||
self.create_spec(id="exclusive_gateway",
|
||||
name="exclusive_gateway",
|
||||
display_name="Exclusive Gateway Example",
|
||||
description='How to take different paths based on input.')
|
||||
|
||||
# workflow_specifications += \
|
||||
# self.create_spec(id="docx",
|
||||
# name="docx",
|
||||
|
@ -109,6 +115,7 @@ class ExampleDataLoader:
|
|||
session.flush()
|
||||
|
||||
def load_all(self):
|
||||
session.add_all(self.make_data())
|
||||
session.commit()
|
||||
for data in self.make_data():
|
||||
session.add(data)
|
||||
session.commit()
|
||||
session.flush()
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
psql -h localhost -U postgres -d postgres
|
|
@ -0,0 +1,3 @@
|
|||
mkdir -p $HOME/docker/volumes/postgres
|
||||
docker pull postgres:latest
|
||||
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
|
|
@ -0,0 +1 @@
|
|||
docker stop pg-docker
|
Loading…
Reference in New Issue