Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan authored May 29, 2024
1 parent b0df97e commit 047a63b
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publishimage-master.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Publish Docker image (master)

# The workflow will push images for master on every merge
# Ideally, this should be done at dockerhub, but it doesn't support secrets (see https://stackoverflow.com/questions/78446824/use-environment-variables-with-sensible-information-in-docker-hub-autobuild)

on:
push:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publishimage-tag.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Publish Docker image (tag)

# The workflow will push images on every tag in the format x.y.z
# Ideally, this should be done at dockerhub, but it doesn't support secrets (see https://stackoverflow.com/questions/78446824/use-environment-variables-with-sensible-information-in-docker-hub-autobuild)

on:
push:
Expand Down
1 change: 0 additions & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
- Fix: use null for non existing attributes in macro substitution applied to "paylaod" field (instead of empty string) to make behaviour more consistent (#4004)
- Fix: simplified GET /version operation, without including "libversions" field (add ?options=libVersions to get it)
- Fix: lighter operation to get databases list from MongoDB (#4517)

2 changes: 1 addition & 1 deletion doc/manuals/devel/sourceCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* [src/lib/cache/](#srclibcache) (Subscription cache implementation)
* [src/lib/logSummary/](#srcliblogsummary) (Log Summary implementation)
* [src/lib/metricsMgr/](#srclibmetricsmgr) (Metrics Manager implementation)
* [src/lib/expressions/](#seribexpressions) (Custom notification expressions support)
* [src/lib/expressions/](#srclibexpressions) (Custom notification expressions support)

## src/app/contextBroker/
The main program is found in `contextBroker.cpp` and its purpose it to:
Expand Down
2 changes: 1 addition & 1 deletion doc/manuals/orion-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ There are some exception cases in which the above restrictions do not apply. In
* URL parameter `q` allows the special characters needed by the [Simple Query Language](#simple-query-language)
* URL parameter `mq` allows the special characters needed by the [Simple Query Language](#simple-query-language)
* URL parameter `georel` and `coords` allow `;`
* Within `ngsi` (i.e. `id`, `type` and attribute values) in [NGSI Payload patching](#ngsi-payload-patching) (to support characters used in the JEXL expression syntax)
* Within `ngsi` (i.e. `id`, `type` and attribute values) in [NGSI Payload patching](#ngsi-payload-patching) (to support characters used in the [JEXL expression syntax](#jexl-support))
* Whichever attribute value which uses `TextUnrestricted` as attribute type (see [Special Attribute Types](#special-attribute-types) section)

## Identifiers syntax restrictions
Expand Down
2 changes: 0 additions & 2 deletions src/lib/expressions/ExprContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ std::string ExprContextList::get(void)
*/
void ExprContextList::add(const std::string &_value)
{

LM_T(LmtExpr, ("adding to JEXL expression context list (string): %s", _value.c_str()));
jh.addString(_value);
}
Expand Down Expand Up @@ -279,7 +278,6 @@ void ExprContextList::add(ExprContextObject exprContextObject)
*/
void ExprContextList::add(ExprContextList exprContextList)
{

std::string s = exprContextList.get();
LM_T(LmtExpr, ("adding to JEXL expression context list (list): %s", s.c_str()));
jh.addRaw(s);
Expand Down
3 changes: 1 addition & 2 deletions src/lib/expressions/ExprManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static const char* cjexl_eval(void* ptr, const char* script_ptr, const char* con
return "";
}
#else
// Interface to use libcjexl.a
// Interface to use libcjexl
extern "C" {
void* cjexl_new_engine();
}
Expand All @@ -72,7 +72,6 @@ void ExprManager::init(void)




/* ****************************************************************************
*
* ExprManager::evaluate -
Expand Down
4 changes: 2 additions & 2 deletions src/lib/rest/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ static void requestCompleted
clock_addtime(&accTimeStat.mongoWriteWaitTime, &threadLastTimeStat.mongoWriteWaitTime);
clock_addtime(&accTimeStat.mongoReadWaitTime, &threadLastTimeStat.mongoReadWaitTime);
clock_addtime(&accTimeStat.mongoCommandWaitTime, &threadLastTimeStat.mongoCommandWaitTime);
clock_addtime(&accTimeStat.exprBasicCtxBldTime, &threadLastTimeStat.exprBasicCtxBldTime);
clock_addtime(&accTimeStat.exprBasicEvalTime, &threadLastTimeStat.exprBasicEvalTime);
clock_addtime(&accTimeStat.exprBasicCtxBldTime, &threadLastTimeStat.exprBasicCtxBldTime);
clock_addtime(&accTimeStat.exprBasicEvalTime, &threadLastTimeStat.exprBasicEvalTime);
clock_addtime(&accTimeStat.exprJexlCtxBldTime, &threadLastTimeStat.exprJexlCtxBldTime);
clock_addtime(&accTimeStat.exprJexlEvalTime, &threadLastTimeStat.exprJexlEvalTime);
clock_addtime(&accTimeStat.renderTime, &threadLastTimeStat.renderTime);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/serviceRoutines/versionTreat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include <mosquitto.h>

#ifndef EXPR_BASIC
// Interface to use libcjexl.a
// Interface to use libcjexl
extern "C" {
const char* cjexl_version();
}
Expand Down

0 comments on commit 047a63b

Please sign in to comment.