Created
June 16, 2014 19:08
-
-
Save indradhanush/949cb5d2de97f3258d6a to your computer and use it in GitHub Desktop.
get_sync_info() in zmq
This file contains 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
class ZMQSyncTarget(ZMQClientBase, SyncTarget): | |
def get_sync_info(self, source_replica_uid): | |
""" | |
Returns the sync state. | |
Note: Doesnt return anything now. BROKEN. | |
""" | |
str_msg = serialize_msg("SourceRequest", | |
source_replica_uid=source_replica_uid) | |
str_sync_type = serialize_msg("SyncType", sync_type="sync-from") | |
str_zmq_verb = serialize_msg("ZMQVerb", verb=proto.ZMQVerb.GET) | |
to_send = [str_msg, str_sync_type, str_msg] | |
self.speaker.send(to_send) | |
# TODO: Find a way to return the response of the above request. | |
# return async_response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment