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

TimerTask timeout_interval unused #525

Closed
lmarburger opened this issue Mar 28, 2016 · 2 comments
Closed

TimerTask timeout_interval unused #525

lmarburger opened this issue Mar 28, 2016 · 2 comments
Labels
bug A bug in the library or documentation. looking-for-contributor We are looking for a contributor to help with this issue. medium-priority Should be done soon.

Comments

@lmarburger
Copy link

lmarburger commented Mar 28, 2016

#timeout_task is executed using execution_interval. Should it use timeout_interval?

def execute_task(completion)
  return nil unless @running.true?
  ScheduledTask.execute(execution_interval, args: [completion], &method(:timeout_task))
  _success, value, reason = @executor.execute(self)

I'm exploring the specs to see if I can expose this feature. In the mean time I thought it wise to confirm that it is, in fact, a bug.

@jdantonio
Copy link
Member

I think the original code is correct. The execution_interval represents the number of seconds between each execution of the task. The timeout_interval is the number of seconds that the task can run without completion before a timeout error is issued. In the code above, the first parameter to ScheduledTask.execute is the delay value--the number of seconds after calling .execute that the task is to be executed. So the execution_interval is the correct value.

I'm out of town attending a conference so I haven't run the code in your branch, I've only looked at the code. There may be a bug elsewhere if you are seeing aberrant behavior.

@jdantonio jdantonio added this to the 1.1.0 milestone Apr 24, 2016
@pitr-ch pitr-ch modified the milestones: 1.0.3, 1.1.0 Nov 5, 2016
@pitr-ch pitr-ch added the bug A bug in the library or documentation. label Nov 24, 2016
@pitr-ch pitr-ch modified the milestones: 1.0.4, 1.0.3 Dec 11, 2016
@pitr-ch pitr-ch modified the milestones: 1.0.4, 1.0.5 Dec 27, 2016
@pitr-ch pitr-ch modified the milestones: 1.0.5, 1.0.6 Feb 26, 2017
@pitr-ch pitr-ch modified the milestones: 1.0.6, 1.1.0 Mar 13, 2017
@pitr-ch pitr-ch assigned pitr-ch and unassigned jdantonio Apr 2, 2017
@pitr-ch
Copy link
Member

pitr-ch commented Apr 2, 2017

This needs to be fixed, I'll have look. Another related issue reported in #526 and #639.

@pitr-ch pitr-ch added the minor label Jun 18, 2018
@pitr-ch pitr-ch removed the minor label Jun 29, 2018
@pitr-ch pitr-ch added medium-priority Should be done soon. looking-for-contributor We are looking for a contributor to help with this issue. labels Jul 6, 2018
@pitr-ch pitr-ch removed their assignment Jul 6, 2018
@pitr-ch pitr-ch removed this from the 1.1.0 milestone Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in the library or documentation. looking-for-contributor We are looking for a contributor to help with this issue. medium-priority Should be done soon.
Projects
None yet
Development

No branches or pull requests

3 participants