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

[DEPRECATED PR] Create Timer Implementation #39

Closed
wants to merge 56 commits into from

Conversation

priyaananthasankar
Copy link
Collaborator

Implements CreateTimer API, TimerTask, CreateTimerAction
TODO:

  1. Unit Tests Pending
  2. Sample Formulation in progress
  3. Tuple Conversion added.

priyaananthasankar and others added 30 commits January 30, 2020 14:04
test initial call
test get activity and build of task set
add missing bits in task_all to account for a failed task
Get rid of all of those hardcoded property value references
refactor the classes that are parsing json strings to remove all of the hardcoded property names
also allows for the classes dangle additional attributes that may be present but not explicitly used for construction
cause it's really hard to read
Copy link
Member

@scgbear scgbear left a comment

Choose a reason for hiding this comment

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

Looks like we have failed build on this PR, lot of flake8 errors being reported

@@ -67,6 +68,15 @@ def from_json(cls, json_string):
"""
json_dict = json.loads(json_string)
return cls(**json_dict)

def get_input(input: Any) -> Any:
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 you're missing the lambda expression that pulls the input value out of the context string passed in. Also I've been separating the implementation of the functions from the context. Two reasons, 1. the functions aren't dependent on any of the class state, you'll get all sorts of squiggly lines all over this function in PyCharm wanting you to either mark it as a classmethod, or pull it out of the class. 2. separation of concerns, this functions can be tested without the DurableOrchestrationContext object created. This it is a small function all together, but I'd rather stick with the convention of separation. Helps the reader to know that they can look in the tasks package to see the actual implementation of all of the functions, instead of some in the tasks package, some directly implemented in the DurableOrchestrationContext module.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

agreed

azure/durable_functions/tasks/__init__.py Show resolved Hide resolved
azure/durable_functions/tasks/timer_task.py Show resolved Hide resolved
@shervyna
Copy link

Just checked and seems like it's all good in terms of rebasing :)

@priyaananthasankar priyaananthasankar changed the title Create Timer Implementation [DEPRECATED PR] Create Timer Implementation Feb 15, 2020
@priyaananthasankar
Copy link
Collaborator Author

Covered as part of #35 . Closing this PR

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.

3 participants