Skip to content

Commit

Permalink
add agreed fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chicco785 committed Nov 18, 2020
1 parent 15bdfa6 commit 69d5db6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/manuals/admin/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To configure QuantumLeap you can use the following environment variables:
| `DEFAULT_CACHE_TTL`| Time to live of metadata cache, default: 60 (seconds) | |
| `QL_CONFIG` | Pathname for tenant configuration |
| `QL_DEFAULT_DB` | Default backend: `timescale` or `crate` |
| `USE_FLASK` | `True` or `False` to use flask server or gunicorn. Default to `False` |
| `USE_FLASK` | `True` or `False` to use flask server (only for Dev) or gunicorn. Default to `False` |
| `LOGLEVEL` | Define the log level for all services (`DEBUG`, `INFO`, `WARNING` , `ERROR`) |

**NOTE**
Expand Down
25 changes: 22 additions & 3 deletions docs/manuals/user/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,28 @@ or [TimescaleDB](https://www.postgresql.org/docs/current/datatype.html) data typ


If the type of any of the received attributes is not present in the column
*NGSI Type* of the previous table, the value of such attribute will be treated
internally as a string. So, if you use `Float` for your attribute type (not
valid), your attribute will be stored as a `text`.
*NGSI Type* of the previous table, the *NGSI Type* (and hence the SQL type)
will be derived from the value. Using the following logic:

```
if a_type not in NGSI
type = Text
if a_value is a list:
type = Array
elif a_value is not None and a_value is an Object:
if a_type is 'Property' and a_value['@type'] is 'DateTime':
type = DateTime
else:
type = StructuredValue
elif a_value is int:
type = Integer
elif a_value is float:
type = Number
elif a_value is bool:
type = Boolean
elif a_value is an ISO DateTime:
type = DateTime
```

### [Time Index](#timeindex)

Expand Down
2 changes: 2 additions & 0 deletions src/server/gconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
# We did some initial quick & dirty benchmarking to get these results.
# We'll likely have to measure better and also understand better the
# way the various Gunicorn worker types actually work. (Pun intended.)
# IMPORTANT: current implementation of ConnectionManager is not thread safe,
# keep this value to 1.
threads = 1


Expand Down

0 comments on commit 69d5db6

Please sign in to comment.