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

Ensure timerules are stored with unique name by using full name (which includes service and subservice) #192

Merged
merged 7 commits into from
Mar 7, 2022

Conversation

AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Mar 3, 2022

@AlvaroVega
Copy link
Member Author

AlvaroVega commented Mar 7, 2022

time=2022-03-07T12:25:57.211Z | lvl=DEBUG | from=172.17.0.12 | corr=n/a | trans=4f0cfc63-1418-4975-83fc-dec28a8de978 | srv=n/a | subsrv=n/a | op=saveTimeRules | comp=perseo-core | msg=Saving timerules from body: [{"name":"ctxt$smartcity$","text":"create context ctxt$smartcity$ partition by service from iotEvent(service="smartcity" and subservice="/")"},{"name":"user_temperature_post@smartcity/","text":"context ctxt$smartcity$ select "user_temperature_post" as ruleName, ev.id? as id, ev.temperature__type? as type, ev.temperature? as value, * from pattern [every ev=iotEvent]"},{"name":"ctxt$smartcity$","text":"create context ctxt$smartcity$ partition by service from iotEvent(service="smartcity" and subservice="/")"},{"name":"my_no_action_rule@smartcity/","text":"context ctxt$smartcity$ select "my_no_action_rule" as ruleName, ev.id? as id, ev.temperature__type? as type, ev.temperature? as value, * from pattern [every ev=iotEvent]"},{"name":"timedRctxt$smartcity$","text":"create context timedRctxt$smartcity$ start @now"},{"name":"mytimerule@smartcity/","text":"context timedRctxt$smartcity$ select "mytimerule" as ruleName, *, current_timestamp.toDate() as currentTS from pattern [every timer:interval(10 sec)]"},{"name":"timedRctxt$smartcity$garden","text":"create context timedRctxt$smartcity$garden start @now"},{"name":"mytimerule@smartcity/garden","text":"context timedRctxt$smartcity$garden select "mytimerule" as ruleName, *, current_timestamp.toDate() as currentTS from pattern [every timer:interval(10 sec)]"}]

time=2022-03-07T12:45:50.274Z | lvl=INFO | from=::ffff:172.17.0.15 | corr=38021ced-41f8-4171-a437-e669015ab147; node=gZtrs19M_; perseocep=331 | trans=7594d0d4-4a94-45f5-a973-a0efbaa8702b | srv=smartcity | subsrv=/garden | op=removeTimeRule | comp=perseo-core | msg=Removing timerule: mytimerule@smartcity/garden

@AlvaroVega AlvaroVega changed the title [WIP] add test with several timerules with same name in different path [WIP] Ensure timerules are stored with unique name by using full name which includes service and subservice Mar 7, 2022
@AlvaroVega AlvaroVega changed the title [WIP] Ensure timerules are stored with unique name by using full name which includes service and subservice Ensure timerules are stored with unique name by using full name (which includes service and subservice) Mar 7, 2022
@AlvaroVega AlvaroVega requested a review from fgalan March 7, 2022 12:47
Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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