[ticket/416] Move database query for resetting module to database_handler

B3P-416