annotate service/rdf_from_mqtt/tasks.py @ 1519:c7217cf1cfc1

add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated Ignore-this: 11b16f06340adc7228930f3774323d1a darcs-hash:a247b60725d7617a4712d6b8e914531020e82f80
author drewp <drewp@bigasterisk.com>
date Tue, 04 Feb 2020 23:33:21 -0800
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1519
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
1 from invoke import task, Collection
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
2
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
3 import sys
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
4 sys.path.append('/my/proj/release')
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
5 from serv_tasks import serv_tasks
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
6
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
7 ns = Collection()
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
8 serv_tasks(ns, 'serv.n3', 'rdf_from_mqtt')
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
9
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
10 @ns.add_task
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
11 @task
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
12 def tail_mqtt(ctx):
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
13 internal_mqtt_port = 10010
c7217cf1cfc1 add rdf_from_mqtt, though at the moment the graph urls may not be in sync and the reqs have just been updated
drewp <drewp@bigasterisk.com>
parents:
diff changeset
14 ctx.run(f'mosquitto_sub -h bang -p 1883 -d -v -t \#')