Skip to content

Commit

Permalink
requested changes (#152)
Browse files Browse the repository at this point in the history
* requested changes

* Update src/cql.rs

Co-authored-by: Jan <[email protected]>

* Update src/cql.rs

Co-authored-by: Jan <[email protected]>

* Update src/cql.rs

Co-authored-by: Jan <[email protected]>

* DateTime<Utc> type added

---------

Co-authored-by: Jan <[email protected]>
  • Loading branch information
enola-dkfz and Threated authored Jun 19, 2024
1 parent 1f6dc85 commit 28ed3d3
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 166 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "focus"
version = "0.5.2"
version = "0.6.0"
edition = "2021"
license = "Apache-2.0"

Expand Down Expand Up @@ -32,8 +32,6 @@ once_cell = "1.18"
# Command Line Interface
clap = { version = "4", default_features = false, features = ["std", "env", "derive", "help", "color"] }



[features]
default = []
bbmri = []
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,32 +60,32 @@ Optionally, you can provide the `TLS_CA_CERTIFICATES_DIR` environment variable t

## Usage

Creating a sample focus healthcheck task using CURL (body can be any string and is ignored):
Creating a sample focus healthcheck task using curl (body can be any string and is ignored):

```bash
curl -v -X POST -H "Content-Type: application/json" --data '{"id":"7fffefff-ffef-fcff-feef-feffffffffff","from":"app1.proxy1.broker","to":["app1.proxy1.broker"],"ttl":"10s","failure_strategy":{"retry":{"backoff_millisecs":1000,"max_tries":5}},"metadata":{"project":"focus-healthcheck"},"body":"wie geht es"}' -H "Authorization: ApiKey app1.proxy1.broker App1Secret" http://localhost:8081/v1/tasks
```

Creating a sample task containing a [Blaze](https://github.com/samply/blaze) query using CURL:
Creating a sample task containing a [Blaze](https://github.com/samply/blaze) query using curl:

```bash
curl -v -X POST -H "Content-Type: application/json" --data '{"id":"7fffefff-ffef-fcff-feef-fefbffffeeff","from":"app1.proxy1.broker","to":["app1.proxy1.broker"],"ttl":"10s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fQoJCQldCgkJfSwKCQkidXJsIjogInVybjp1dWlkOjVlZThkZTczLTM0N2UtNDdjYS1hMDE0LWYyZTcxNzY3YWRmYyIKCX0KfQ=="}' -H "Authorization: ApiKey app1.proxy1.broker App1Secret" http://localhost:8081/v1/tasks
```

Creating a sample task containing an abstract syntax tree (AST) query using CURL:
Creating a sample task containing an abstract syntax tree (AST) query using curl:

```bash
curl -v -X POST -H "Content-Type: application/json" --data '{"id":"7fffefff-ffef-fcff-feef-feffffffffff","from":"app1.proxy1.broker","to":["app1.proxy1.broker"],"ttl":"10s","failure_strategy":{"retry":{"backoff_millisecs":1000,"max_tries":5}},"metadata":{"project":"bbmri"},"body":"eyJsYW5nIjoiYXN0IiwicGF5bG9hZCI6ImV5SmhjM1FpT25zaWIzQmxjbUZ1WkNJNklrOVNJaXdpWTJocGJHUnlaVzRpT2x0N0ltOXdaWEpoYm1RaU9pSkJUa1FpTENKamFHbHNaSEpsYmlJNlczc2liM0JsY21GdVpDSTZJazlTSWl3aVkyaHBiR1J5Wlc0aU9sdDdJbXRsZVNJNkltZGxibVJsY2lJc0luUjVjR1VpT2lKRlVWVkJURk1pTENKemVYTjBaVzBpT2lJaUxDSjJZV3gxWlNJNkltMWhiR1VpZlN4N0ltdGxlU0k2SW1kbGJtUmxjaUlzSW5SNWNHVWlPaUpGVVZWQlRGTWlMQ0p6ZVhOMFpXMGlPaUlpTENKMllXeDFaU0k2SW1abGJXRnNaU0o5WFgxZGZWMTlMQ0pwWkNJNkltRTJaakZqWTJZekxXVmlaakV0TkRJMFppMDVaRFk1TFRSbE5XUXhNelZtTWpNME1DSjkifQ=="}' -H "Authorization: ApiKey app1.proxy1.broker App1Secret" http://localhost:8081/v1/tasks
```

Creating a sample [Exporter](https://github.com/samply/exporter) "execute" task containing an Exporter query using CURL:
Creating a sample [Exporter](https://github.com/samply/exporter) "execute" task containing an Exporter query using curl:

```bash
curl -v -X POST -H "Content-Type: application/json" --data '{"body":"ew0KICAic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xDSjJZV3gxWlVOdlpHVWlPaUpOWldScFkyRjBhVzl1VTNSaGRHVnRaVzUwSW4xZExDSndiM0IxYkdGMGFXOXVJanBiZXlKamIyUmxJanA3SW1OdlpHbHVaeUk2VzNzaWMzbHpkR1Z0SWpvaWFIUjBjRG92TDNSbGNtMXBibTlzYjJkNUxtaHNOeTV2Y21jdlEyOWtaVk41YzNSbGJTOXRaV0Z6ZFhKbExYQnZjSFZzWVhScGIyNGlMQ0pqYjJSbElqb2lhVzVwZEdsaGJDMXdiM0IxYkdGMGFXOXVJbjFkZlN3aVkzSnBkR1Z5YVdFaU9uc2liR0Z1WjNWaFoyVWlPaUowWlhoMEwyTnhiQzFwWkdWdWRHbG1hV1Z5SWl3aVpYaHdjbVZ6YzJsdmJpSTZJazFsWkdsallYUnBiMjVUZEdGMFpXMWxiblFpZlgxZExDSnpkSEpoZEdsbWFXVnlJanBiZXlKamIyUmxJanA3SW5SbGVIUWlPaUpOWldScFkyRjBhVzl1Vkhsd1pTSjlMQ0pqY21sMFpYSnBZU0k2ZXlKc1lXNW5kV0ZuWlNJNkluUmxlSFF2WTNGc0lpd2laWGh3Y21WemMybHZiaUk2SWxCeWIyTmxaSFZ5WlZSNWNHVWlmWDFkZlYxOWZRPT0iLA0KICAicXVlcnktY29udGFjdC1pZCIgOiAicmVzZWFyY2hlckB0ZXN0LmRrZnouZGUiLA0KICAicXVlcnktZm9ybWF0IiA6ICJDUUxfREFUQSIsDQogICJ0ZW1wbGF0ZS1pZCIgOiAiY2NwIg0KfQ==","failure_strategy":{"retry":{"backoff_millisecs":1000,"max_tries":5}},"from":"app1.proxy1.broker","id":"22e1ea3a-07f3-4592-a888-82f2226a44a2","metadata":{"project":"exporter","task_type":"EXECUTE"},"to":["app1.proxy1.broker"],"ttl":"10s","status":null,"task":null}' -H "Authorization: ApiKey app1.proxy1.broker App1Secret" http://localhost:8081/v1/tasks

```

Creating a sample [Exporter](https://github.com/samply/exporter) "status" task using CURL:
Creating a sample [Exporter](https://github.com/samply/exporter) "status" task using curl:

```bash
curl -v -X POST -H "Content-Type: application/json" --data '{"body":"ew0KICAicXVlcnktZXhlY3V0aW9uLWlkIiA6ICIxOSINCn0=","failure_strategy":{"retry":{"backoff_millisecs":1000,"max_tries":5}},"from":"app1.proxy1.broker","id":"22e1ea3a-07f3-4592-a888-82f2226a44a2","metadata":{"project":"exporter","task_type":"STATUS"},"to":["app1.proxy1.broker"],"ttl":"10s","status":null,"task":null}' -H "Authorization: ApiKey app1.proxy1.broker App1Secret" http://localhost:8081/v1/tasks
Expand Down
Empty file removed resources/test/result.cql
Empty file.
2 changes: 1 addition & 1 deletion src/blaze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub async fn run_cql_query(library: &Value, measure: &Value) -> Result<String, F
evaluate_measure(url).await
}

pub fn parse_blaze_query_payload_ast(ast_query: &String) -> Result<ast::Ast, FocusError> {
pub fn parse_blaze_query_payload_ast(ast_query: &str) -> Result<ast::Ast, FocusError> {
let decoded = util::base64_decode(ast_query)?;
Ok(serde_json::from_slice(&decoded)?)
}
Loading

0 comments on commit 28ed3d3

Please sign in to comment.