Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support handle msgs from external in HOOK_WAIT state. #1572

Merged
merged 15 commits into from Dec 22, 2023
Merged

Conversation

wanghaEMQ
Copy link
Member

  • handle msgs from external in HOOK_WAIT state.
  • Support read key and offset from json from external.
  • Support forward msgs or parquet filename to local broker to active handler.

Signed-off-by: wanghaemq <wangwei@emqx.io>
Signed-off-by: wanghaemq <wangwei@emqx.io>
Signed-off-by: wanghaemq <wangwei@emqx.io>
Signed-off-by: wanghaemq <wangwei@emqx.io>
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

Attention: 82 lines in your changes are missing coverage. Please review.

Comparison is base (2f0a233) 57.00% compared to head (b5e1223) 56.43%.
Report is 3 commits behind head on master.

Files Patch % Lines
nanomq/webhook_inproc.c 19.19% 80 Missing ⚠️
nanomq/webhook_post.c 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1572      +/-   ##
==========================================
- Coverage   57.00%   56.43%   -0.57%     
==========================================
  Files          18       18              
  Lines        6663     6753      +90     
==========================================
+ Hits         3798     3811      +13     
- Misses       2865     2942      +77     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* NEW [hook] Support search parquet and send files with mqtt.

Signed-off-by: wanghaemq <wangwei@emqx.io>
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Dismissed Show dismissed Hide dismissed
nanomq/webhook_inproc.c Dismissed Show dismissed Hide dismissed
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed

for (i = 0; i < conf->web_hook.pool_size; i++) {
works[i] = alloc_work(sock, &conf->web_hook, &conf->exchange);
works[i]->id = i;
works[i]->mqtt_sock = &mqtt_sock;

Check warning

Code scanning / CodeQL

Local variable address stored in non-local memory Warning

A stack address (
source
) may be assigned to a non-local variable.
…are matched.

Signed-off-by: wanghaemq <wangwei@emqx.io>
Signed-off-by: wanghaemq <wangwei@emqx.io>
* FIX [hook] Fix the wrong filenames in json.

Signed-off-by: wanghaemq <wangwei@emqx.io>
strcpy(bname+strlen(bname), ext, 15);
#else
#include <libgen.h>
// strcpy(bname, basename(fpath));

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Fixed Show fixed Hide fixed
nanomq/webhook_inproc.c Dismissed Show dismissed Hide dismissed
Signed-off-by: wanghaemq <wangwei@emqx.io>
Signed-off-by: wanghaemq <wangwei@emqx.io>
nanomq/webhook_inproc.c Dismissed Show dismissed Hide dismissed
nanomq/webhook_inproc.c Dismissed Show dismissed Hide dismissed
@wanghaEMQ wanghaEMQ changed the title [WIP] Support handle msgs from external in HOOK_WAIT state. Support handle msgs from external in HOOK_WAIT state. Dec 22, 2023
@wanghaEMQ wanghaEMQ marked this pull request as ready for review December 22, 2023 07:24
Signed-off-by: wanghaemq <wangwei@emqx.io>
Signed-off-by: wanghaemq <wangwei@emqx.io>
Signed-off-by: jaylin <jaylin@emqx.io>
@JaylinYu
Copy link
Member

be aware that searching result could lay in both MQ and parquet file @wanghaEMQ

nanomq/webhook_inproc.c Show resolved Hide resolved
@JaylinYu JaylinYu merged commit 43c40d1 into master Dec 22, 2023
87 of 88 checks passed
@JaylinYu JaylinYu deleted the wangha/dev branch December 22, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants