Skip to content

Commit

Permalink
Auth call
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartkmarsh committed Mar 8, 2019
1 parent 86b4601 commit 0dfaa22
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ virtualenv -qq .build -p Python2.7
source .build/bin/activate
pip -q install pex==1.2.13
echo building ./bin/dataplicity
pex dataplicity==0.4.33a3 --pre -r requirements.txt -o bin/dataplicity -m dataplicity.app:main
pex dataplicity==0.4.33a4 --pre -r requirements.txt -o bin/dataplicity -m dataplicity.app:main
deactivate
echo built dataplicity agent v`./bin/dataplicity version`
2 changes: 1 addition & 1 deletion dataplicity/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.33a3"
__version__ = "0.4.33a4"
9 changes: 7 additions & 2 deletions dataplicity/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,19 @@ def disk_poll(self):
)

def tag_poll(self):
log.info("Polling tags...")
with self.remote.batch() as batch:
batch.call_with_id(
"authenticate_result",
"device.check_auth",
device_class="tuxtunnel",
serial=self.serial,
auth_token=self.auth_token,
)
batch.call_with_id(
"set_machine_defined_tags_result",
"device.set_machine_defined_tags",
tag_list=get_tag_list(),
)
log.info("Tags: %s", ",".join(get_tag_list()))

def poll(self):
"""Called at regular intervals."""
Expand Down

0 comments on commit 0dfaa22

Please sign in to comment.