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

Implementation of call functions on iteration state #19

Merged
merged 5 commits into from
Dec 4, 2020

Conversation

zloidemon
Copy link
Contributor

@zloidemon zloidemon commented Nov 21, 2016

  • Added the ability to set iteration and full scan delays for a task.
  • Added callbacks for a task at various stages of the full scan iteration.

@ChangeLog:

  • Added the ability to set iteration and full scan delays for a task.
  • Added callbacks for a task at various stages of the full scan iteration.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@Totktonada
Copy link
Member

@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?

@Totktonada
Copy link
Member

(Sorry for the looong delay.)

@LeonidVas LeonidVas self-assigned this Nov 10, 2020
LeonidVas and others added 2 commits November 19, 2020 15:54
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
Copy link

@artemreyt artemreyt left a 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.

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Done.

zloidemon and others added 3 commits December 3, 2020 15:56
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.
@LeonidVas
Copy link
Contributor

Also, there isn't test for on_full_scan_error. Maybe add it?

Added.

@LeonidVas LeonidVas requested review from LeonidVas and artemreyt and removed request for Totktonada and LeonidVas December 3, 2020 13:05
Copy link

@artemreyt artemreyt left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link

@artemreyt artemreyt left a comment

Choose a reason for hiding this comment

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

LGTM.

@LeonidVas LeonidVas merged commit f5c3969 into tarantool:master Dec 4, 2020
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.

How to run expirationd periodically? Pass scan iteration number to callbacks
4 participants