- log_con = assert(env:connect(logdb))
- log_con:execute("CREATE TABLE log(time_stamp datetime,sensor_id varchar(16),sensor varchar(16),param varchar(16),value float)")
- log_con:execute("CREATE INDEX log_idx ON log(sensor_id,sensor,param,time_stamp)")
- else
- log_con = assert(env:connect(logdb))
- end
+ end
+ local log_con = assert(env:connect(logdb))
+ log_con:execute("CREATE TABLE log(time_stamp datetime,sensor_id varchar(16),sensor varchar(16),param varchar(16),value float)")
+ log_con:execute("CREATE INDEX log_idx ON log(sensor_id,sensor,param,time_stamp)")
+ log_con:close()
+end
+
+if web_url then
+ http = require("socket.http")
+ http.TIMEOUT = web_timeout