Callback implementation for Python GCL API#31
Open
kirillsc wants to merge 4 commits intofinos:mainfrom
Open
Conversation
sample update
sample update
|
|
||
|
|
||
| def create_session(self, service_name, context, callback): | ||
|
|
Collaborator
There was a problem hiding this comment.
docstring will be useful here
|
|
||
| return new_session | ||
|
|
||
| def close(self, wait_for_sessions_completion=True): |
Collaborator
There was a problem hiding this comment.
Either I would rename close to delete_session or rename create_session to open
| return new_session | ||
|
|
||
| def close(self, wait_for_sessions_completion=True): | ||
| print("Connector: Closing HTC-Grid Connector") |
Collaborator
There was a problem hiding this comment.
please use logging library instead of
|
|
||
| return new_session | ||
|
|
||
| def close(self, wait_for_sessions_completion=True): |
Collaborator
There was a problem hiding this comment.
docstring will be useful here
| self.wait_for_sessions_completion = wait_for_sessions_completion | ||
|
|
||
| def register_session(self, new_session): | ||
| assert(new_session.session_id not in self.active_sessions) |
Collaborator
There was a problem hiding this comment.
docstring will be useful here
| self.active_sessions[new_session.session_id] = new_session | ||
| pass | ||
|
|
||
| def diregister_session(self, session): |
Collaborator
There was a problem hiding this comment.
Is there a typo in the in the method name (diregister)?
|
|
||
|
|
||
| def check_tasks_states(self): | ||
| print(f"Session: Checking status {self.session_id}, submitted: {len(self.submitted_task_ids)}, received: {len(self.received_task_ids)}") |
Collaborator
There was a problem hiding this comment.
Can you logging library instead of print please.
|
|
||
|
|
||
| def check_tasks_states(self): | ||
| print(f"Session: Checking status {self.session_id}, submitted: {len(self.submitted_task_ids)}, received: {len(self.received_task_ids)}") |
Collaborator
There was a problem hiding this comment.
Docstring will be useful here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a draft for the Python Grid Connector Library with support of (client-based) callbacks.
This is not a final version but a draft for the code review.
What is implemented:
What is not implemented
Checklist
README.md, or thedocsdirectory)area/controlplane) and kind (e.g.kind/improvement)BONUS POINTS checklist: