No longer requires tag.tag_mysql
This commit is contained in:
@@ -7,7 +7,7 @@ Created on April 7, 2016
|
||||
@description: Continuously loops through a list of tags to store values from a PLC into a MySQL database
|
||||
'''
|
||||
|
||||
from tag.tag_mysql import Tag
|
||||
from tag.tag import Tag
|
||||
import traceback
|
||||
import time
|
||||
import random
|
||||
@@ -53,15 +53,6 @@ class Sample(Tag):
|
||||
self.sendToDB()
|
||||
return self.value
|
||||
|
||||
def sendToDB(self):
|
||||
data = {}
|
||||
data['val'] = self.value
|
||||
data['tagID'] = self.db_id
|
||||
r = requests.post('{}/tag_val'.format(web_address), data=data)
|
||||
resp = json.loads(r.text)
|
||||
print("Stored {} for {} at {}".format(resp['val'], self.name, resp['createdAt']))
|
||||
self.last_send_time = time.time()
|
||||
|
||||
tag_store = {}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user