Commit 323b4d5e authored by Bijun Li's avatar Bijun Li
Browse files

Merge branch 'dev' into action-api

parents 1c1d6246 30525fa6
Showing with 113 additions and 24 deletions
+113 -24
......@@ -1388,6 +1388,11 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "service",
"dbtype": "Text",
"indexed": false
},
{
"name": "starred",
"dbtype": "Bool",
......@@ -2118,6 +2123,11 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "repository",
"dbtype": "Text",
"indexed": false
},
{
"name": "starred",
"dbtype": "Bool",
......@@ -2198,6 +2208,11 @@
"dbtype": "Integer",
"indexed": false
},
{
"name": "repository",
"dbtype": "Text",
"indexed": false
},
{
"name": "starred",
"dbtype": "Bool",
......@@ -2288,6 +2303,11 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "repository",
"dbtype": "Text",
"indexed": false
},
{
"name": "runDestination",
"dbtype": "Text",
......@@ -2368,6 +2388,11 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "repository",
"dbtype": "Text",
"indexed": false
},
{
"name": "starred",
"dbtype": "Bool",
......@@ -2455,6 +2480,76 @@
}
]
},
{
"name": "Integrator",
"properties": [
{
"name": "dateAccessed",
"dbtype": "DateTime",
"indexed": false
},
{
"name": "dateCreated",
"dbtype": "DateTime",
"indexed": false
},
{
"name": "dateModified",
"dbtype": "DateTime",
"indexed": false
},
{
"name": "deleted",
"dbtype": "Bool",
"indexed": false
},
{
"name": "externalId",
"dbtype": "Text",
"indexed": false
},
{
"name": "genericType",
"dbtype": "Text",
"indexed": false
},
{
"name": "importJson",
"dbtype": "Text",
"indexed": false
},
{
"name": "itemDescription",
"dbtype": "Text",
"indexed": false
},
{
"name": "name",
"dbtype": "Text",
"indexed": false
},
{
"name": "repository",
"dbtype": "Text",
"indexed": false
},
{
"name": "starred",
"dbtype": "Bool",
"indexed": false
},
{
"name": "uid",
"dbtype": "Integer",
"indexed": false
},
{
"name": "version",
"dbtype": "Integer",
"indexed": false
}
]
},
{
"name": "Invoice",
"properties": [
......@@ -3113,6 +3208,11 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "service",
"dbtype": "Text",
"indexed": false
},
{
"name": "starred",
"dbtype": "Bool",
......@@ -3138,11 +3238,6 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "type",
"dbtype": "Text",
"indexed": false
},
{
"name": "uid",
"dbtype": "Integer",
......@@ -4143,16 +4238,6 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "enablePresence",
"dbtype": "Bool",
"indexed": false
},
{
"name": "enableReceipts",
"dbtype": "Bool",
"indexed": false
},
{
"name": "externalId",
"dbtype": "Text",
......@@ -4188,11 +4273,6 @@
"dbtype": "Text",
"indexed": false
},
{
"name": "nameQuality",
"dbtype": "Integer",
"indexed": false
},
{
"name": "role",
"dbtype": "Text",
......@@ -6451,4 +6531,4 @@
]
}
]
}
}
\ No newline at end of file
......@@ -74,10 +74,19 @@ pub fn run_importer(
let path = env::current_dir()?;
let parent = path.parent().expect("Failed to get parent directory");
let wa_volume = format!(
let whatsapp_volume = format!(
"--volume={}/importers/data-synapse:/usr/src/importers/data-synapse",
parent.display().to_string()
);
let docker_image = result
.first()
.expect("Failed to get ImporterRun item")
.as_object()
.expect("Failed to get value")
.get("repository")
.expect("Failed to get repository for docker image")
.as_str()
.expect("Failed to get string");
let mut args: Vec<String> = Vec::new();
args.push("run".to_string());
for arg in docker_arguments(cli_options) {
......@@ -90,8 +99,8 @@ pub fn run_importer(
args.push("--rm".to_string());
args.push("--name=memri-importers_1".to_string());
args.push(format!("--env=RUN_UID={}", payload.uid));
args.push(wa_volume);
args.push("memri-importers:latest".to_string());
args.push(whatsapp_volume);
args.push(format!("{}:latest", docker_image));
log::debug!("Starting importer docker command {:?}", args);
let command = Command::new("docker").args(&args).spawn();
match command {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment