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

New task-scheduling infrastructure. #73

Merged
merged 8 commits into from
Jun 11, 2015

Conversation

RonConescu
Copy link

Take 2.

This commit contains a major architectural revision: cleaning up our scheduling system. The original system scheduled tasks into the future; this system maintains the scheduling rules, but doesn't actually schedule anything until the user taps on it.

We also:

  • centralized lots of code, making it easier to maintain and debug
  • made certain common features (schedule delays and task-expiration periods) data-driven instead of software-driven

This commit addresses concerns raised in the comments to my previous commit:

  • DataSubstrate has been re-consolidated (and extended)
  • superfluous files have been removed
  • formatting has (mostly) been preserved

This commit contains a major architectural revision:  cleaning up our scheduling system.  The original system scheduled tasks into the future; this system maintains the scheduling rules, but doesn't actually schedule anything until the user taps on it.  We also:
- centralized lots of code, making it easier to maintain and debug
- made certain common features (schedule delays and task-expiration periods) data-driven instead of software-driven
@jwe-apple
Copy link
Member

Please remove OpenSSL.

@jwe-apple
Copy link
Member

@p2 Could you please have a look at this from your point of view?

@p2
Copy link
Member

p2 commented Jun 3, 2015

Hmm, it doesn't seem to be up to date with latest master. This commit re-introduces several changes made in the past few weeks, such as re-separation of APCDataSubstrate (#30), reverses fixes to storyboards and reverses a lot of fixed code style issues.

@jwe-apple
Copy link
Member

@RonConescu I assume you're going to update this before we review? I emailed Pablo earlier, did that get through?

@peculiar
Copy link
Member

peculiar commented Jun 4, 2015

@jwe-apple Your comments were received and this PR will be updated.

This commit contains a major architectural revision:  cleaning up our scheduling system.  The original system scheduled tasks into the future; this system maintains the scheduling rules, but doesn't actually schedule anything until the user taps on it.

We also:
- centralized lots of code, making it easier to maintain and debug
- made certain common features (schedule delays and task-expiration periods) data-driven instead of software-driven

This commit addresses concerns raised in the pull-request comments to my previous commit:
- DataSubstrate has been re-consolidated (and extended)
- superfluous files have been removed
- formatting has (mostly) been preserved
@RonConescu
Copy link
Author

Hi, folks. I've submitted a second commit.

@RonConescu
Copy link
Author

@jwe-apple , @YuanZhu-apple , @p2 -- I completely redid the contents of the pull request, and updated the introductory comment. I've also submitted a bunch of subsequent edits to comments and formatting. Since I haven't seen any comments from you, I'll assume that GitHub hasn't sent you an email about any of that... ? I look forward to your next round of feedback.

{
[self finishRefreshCommandPassingError: errorFromServerFetch
toCompletionBlock: completionBlock];
}
Copy link
Member

Choose a reason for hiding this comment

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

Declare a weakSelf outside this block and use it here to avoid reference loop.
__weak typeof(self) weakSelf = self;

Copy link
Author

Choose a reason for hiding this comment

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

Done, in commit 5c46280.

@p2
Copy link
Member

p2 commented Jun 5, 2015

Sorry for the delay @RonConescu . I did not test the code, but from going over it in GitHub this looks all good from my side – I'm mostly focused on keeping interdependencies down, and there are improvements on that front in this PR.

(One hint: coding-style-guide.md)


@see -dateByAddingISO8601Duration:
*/
- (NSDate *) dateBySubtractingISO8601Duration: (NSString *) durationString;

Copy link
Member

Choose a reason for hiding this comment

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

Generally, I think all these utility function need test coverage.

Copy link
Author

Choose a reason for hiding this comment

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

Created a GitHub issue for this.

@RonConescu
Copy link
Author

John, Pascal, Yuan,

Thank you for the comments above. A general question: for many of the pull requests on this project, you typically have many comments and requirements, both granular and architectural. Pascal and Yuan's comments above seem more granular than architectural, which suggested to me that I should wait to make more changes until you'd had a chance to add architectural requirements. (Obviously, Pascal's "interdependencies" comment is architectural, but it was also a "looks good" instead of a "please change such-and-such.") Should I continue to wait? If I implement Pascal and Yuan's stuff, above, will this pull request become acceptable?

Thanks, very much.

Ron

(to/cc: @jwe-apple @p2 @YuanZhu-apple @insha @peculiar @pabloarce-yml)

@RonConescu
Copy link
Author

Gang,

I've submitted a new commit, with responses to each item above. I look forward to your feedback.

Ron

cc: @jwe-apple @p2 @YuanZhu-apple @insha @peculiar @pabloarce-yml @RonConescu

@p2
Copy link
Member

p2 commented Jun 9, 2015

I'm not set up to test the new scheduler just yet, hence no substantial comments from my side and no objections either.

if (serializedTimesOfDayString.length > 0)
{
NSDateFormatter *formatter = [NSDateFormatter new];
formatter.locale = [NSLocale localeWithLocaleIdentifier: @"en_US_POSIX"];
Copy link
Member

Choose a reason for hiding this comment

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

Use kAPCDateFormatLocaleEN_US_POSIX

Copy link
Author

Choose a reason for hiding this comment

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

Done. Also applied that constant to everywhere else in AppCore which needed it.

@YuanZhu-apple
Copy link
Member

@RonConescu I think this is ready to go after some response for the last comment I made.

@RonConescu
Copy link
Author

@YuanZhu-apple — Back to you, sir.

YuanZhu-apple added a commit that referenced this pull request Jun 11, 2015
New task-scheduling infrastructure.
@YuanZhu-apple YuanZhu-apple merged commit eab1100 into ResearchKit:master Jun 11, 2015
Erin-Mounts added a commit to Erin-Mounts/AppCore that referenced this pull request Feb 12, 2016
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.

5 participants