def ckan_db_init(self, retry_seconds=DB_INIT_RETRY_SECONDS):
<EOL>started = time.time()<EOL>while True:<EOL><INDENT>try:<EOL><INDENT>self.run_command(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>db_links=True,<EOL>clean_up=True,<EOL>)<EOL>break<EOL><DEDENT>except WebCommandError:<EOL><INDENT>if started + retry_seconds > time.time():<EOL><INDENT>raise<EOL><DEDENT><DEDENT>time.sleep(DB_INIT_RETRY_DELAY)<EOL><DEDENT>
Run db init to create all ckan tables

:param retry_seconds: how long to retry waiting for db to start