Error setting up share logger sql: (, NameError("name 'long' is not defined",), )
Im trying to setup eloipool sharelogger for either psql or mysql.
The config of eloi looks like this:
{
'type': 'sql',
'engine': 'postgres',
'dbopts': {
'host': 'localhost',
'database': 'pooldb',
'user': 'eloipool',
'password': 'somethingsecret',
},
'statement': "insert into shares (rem_host, username, our_result, upstream_result, reason, solution) values ({Q(remoteHost)}, {username}, {YN(not(rejectReason))}, {YN(upstreamResult)}, {rejectReason}, decode({solution}, 'hex'))",
},
{
'type': 'sql',
'engine': 'mysql',
'dbopts': {
'host': 'localhost',
'db': 'pooldb',
'user': 'eloipool',
'password': 'somethingsecret',
},
'statement': "insert into shares (rem_host, username, our_result, upstream_result, reason, solution) values ({Q(remoteHost)}, {username}, {YN(not(rejectReason))}, {YN(upstreamResult)}, {rejectReason}, unhex({solution}))",
},
Maybe i have to create tables manually?? But how??
EDIT:
I need both database setups (mysql and psql), so i need the correct commands most probably to create the required tables but im not familiar enough with both languages to do this correctly.