Skip to content

Commit

Permalink
Merge pull request #84 from dimagi/sk/fix-checkpointing
Browse files Browse the repository at this point in the history
set checkpoint manager when cloning
  • Loading branch information
snopoke authored Jul 2, 2018
2 parents 368936e + 59df155 commit 5817b99
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion commcare_export/commcare_hq_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,17 @@ def authenticated(self, username=None, password=None, mode=AUTH_MODE_SESSION):
else:
raise Exception('Unknown auth mode: %s' % mode)

return CommCareHqClient(url=self.url, project=self.project, version=self.version, session=session, auth=auth)
return self._clone_with(session, auth)

def _clone_with(self, session, auth):
cloned = CommCareHqClient(
self.url,
self.project,
session=session,
auth=auth
)
cloned.set_checkpoint_manager(self._checkpoint_manager, **self._checkpoint_kwargs)
return cloned

def get(self, resource, params=None):
"""
Expand Down

0 comments on commit 5817b99

Please sign in to comment.