-
Notifications
You must be signed in to change notification settings - Fork 14
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
Implementation of call functions on iteration state #19
Conversation
@zloidemon The changes you propose looks useful for me. I would rebase the PR on top of the current master, implement the changes I proposed above and split the commit into two ones: one re delays and another re callbacks. Aren't you mind? |
(Sorry for the looong delay.) |
Added the ability to set iteration and full scan delays for a task. iteration delay - max sleep time between iterations (in seconds). full scan delay - sleep time between full scans (in seconds). Related to tarantool#38
6ca84d7
to
15f8ea4
Compare
15f8ea4
to
29fced6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there isn't test for on_full_scan_error
. Maybe add it?
* `on_full_scan_success` - call function on success full scan iteration | ||
Receives `(task)` as arguments. | ||
* `on_full_scan_error` - call function on error full scan iteration | ||
Receives `(task, error)` as arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, it isn't obvious that on_full_scan_complete
will be called after on_full_scan_success
or on_full_scan_error
. I propose to mention it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Added callbacks for a task at various stages of the full scan iteration. `on_full_scan_start` - call function on starting full scan iteration. `on_full_scan_complete` - call function on complete full scan iteration. `on_full_scan_success` - call function on success full scan iteration. `on_full_scan_error` - call function on error full scan iteration. Closes tarantool#25
Added test delays (iteration and full scan) and full scan iteration callbacks.
29fced6
to
0c4d46d
Compare
Added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@ChangeLog: