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

Issue85 #90

Merged
merged 12 commits into from
Aug 9, 2018
Merged

Issue85 #90

merged 12 commits into from
Aug 9, 2018

Conversation

JasonNoonan
Copy link
Contributor

Description

Modify the ScheduledMessage class to trigger using StartAfter instead of IntervalMS.
Adjust StartAfter using IntervalMS after each run.
Add Pester tests for ScheduledMessage class.

Related Issue

#85

Motivation and Context

This solves the issue of Scheduled Commands firing off IntervalMS after they were created, instead of triggering at the StartAfter time and then repeating at a frequency of IntervalMS

How Has This Been Tested?

Pester tests. I also have a PoshBot server in my work environment.

Screenshots (if appropriate):

Types of changes

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [ x ] I have read the CONTRIBUTING document.
  • [ x ] I have added tests to cover my changes.
  • [ x ] All new and existing tests passed.

@devblackops devblackops self-requested a review August 8, 2018 04:27
@devblackops devblackops self-assigned this Aug 8, 2018
}

[void]ResetTimer() {
$this.Stopwatch.Reset()
$this.Stopwatch.Start()
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the stopwatch is not longer need. Can you remove it from the class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I removed it from the scheduler class. I did a search and the only other areas the stopwatch seems to be referenced were in the actual Bot instance for tracking uptime.

Let me know if you find anything else that requires changing!

@devblackops
Copy link
Member

LGTM. Thanks!

@devblackops devblackops merged commit d6f4b3e into poshbotio:master Aug 9, 2018
@JasonNoonan JasonNoonan deleted the Issue85 branch August 18, 2018 21:28
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