pyzor.engines.mysql

MySQLdb database engine.

class pyzor.engines.mysql.MySQLDBHandle(fn, mode, max_age=None)[source]

Bases: pyzor.engines.common.BaseEngine

absolute_source = False
classmethod get_prefork_connections(fn, mode, max_age=None)[source]

Yields a number of database connections suitable for a Pyzor pre-fork server.

handles_one_step = True
items()[source]

Return a list of (key, record).

iteritems()[source]

Iterate over pairs of (key, record).

log = <Logger pyzord (WARNING)>
reconnect()[source]
reconnect_period = 60
reorganize_period = 86400
report(keys)[source]

Report the corresponding key as spam, incrementing the report count.

Engines that implement don’t implement this method should have handles_one_step set to False.

start_reorganizing()[source]
whitelist(keys)[source]

Report the corresponding key as ham, incrementing the whitelist count.

Engines that implement don’t implement this method should have handles_one_step set to False.

class pyzor.engines.mysql.ProcessMySQLDBHandle(fn, mode, max_age=None)[source]

Bases: pyzor.engines.mysql.MySQLDBHandle

reconnect()[source]
class pyzor.engines.mysql.ThreadedMySQLDBHandle(fn, mode, max_age=None, bound=None)[source]

Bases: pyzor.engines.mysql.MySQLDBHandle

reconnect()[source]