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

RUNNERNEXT function on standalone #1088

Merged
merged 16 commits into from Jul 13, 2022
Merged

Conversation

pi-r-p
Copy link
Contributor

@pi-r-p pi-r-p commented Apr 5, 2022

This new function allow to reschedule a runner from the runner itself.

To test, generate a token with this capability:

  'attributes' {
    '.cap:runner.reschedule.min.period' '5000'
  }

Use it with CAPADD inside your runner. From the runner, you can schedule the next iteration to "start of the script" + the period you want:
10 s RUNNERNEXT

It will fail if the requested period is less than the one defined in capability.

The function have no effect on a standalone with remote runner execution, or on a distributed instance.

@pi-r-p
Copy link
Contributor Author

pi-r-p commented Apr 6, 2022

doc OK. https://warp10.io/doc/RUNNERNEXT

@pi-r-p
Copy link
Contributor Author

pi-r-p commented Apr 9, 2022

  • Fixed overflow if MAXLONG RUNNERNEXT
  • introduced RUNNERPROG to schedule at a given time:
"2022-04-09T21:48:00.0Z" TOTIMESTAMP RUNNERPROG

Both combined can allow synchronization on absolute time easily:

"2022-04-09T21:48:00.0Z" TOTIMESTAMP 'startsync' STORE
$startsync NOW >
<%
  MAXLONG RUNNERNEXT
  $startsync RUNNERPROG
%>
<%
  1 h RUNNERNEXT
%>
 IFTE

@pi-r-p pi-r-p marked this pull request as draft April 9, 2022 21:58
@hbs
Copy link
Collaborator

hbs commented Apr 9, 2022 via email

@pi-r-p
Copy link
Contributor Author

pi-r-p commented Apr 11, 2022

Function renamed + $runner.execution.counter added.

Execution counter does not reset when disabling and reenabling the runner, you have to rename the runner.

@pi-r-p pi-r-p marked this pull request as ready for review April 11, 2022 13:55
@pi-r-p
Copy link
Contributor Author

pi-r-p commented May 19, 2022

ready for new review.

@pi-r-p
Copy link
Contributor Author

pi-r-p commented Jun 17, 2022

ready for new review.

@pi-r-p
Copy link
Contributor Author

pi-r-p commented Jul 13, 2022

Done. Doc updated.
I will update runner documentation once merged.

@hbs hbs merged commit 5f14076 into senx:master Jul 13, 2022
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