MCPcopy
hub / github.com/pyload/pyload / run

Method run

module/database/DatabaseBackend.py:128–153  ·  view source on GitHub ↗

main loop, which executes commands

(self)

Source from the content-addressed store, hash-verified

126 self.setuplock.wait()
127
128 def run(self):
129 """main loop, which executes commands"""
130 convert = self._checkVersion() #returns None or current version
131
132 self.conn = sqlite3.connect("files.db")
133 chmod("files.db", 0600)
134
135 self.c = self.conn.cursor() #compatibility
136
137 if convert is not None:
138 self._convertDB(convert)
139
140 self._createTables()
141 self._migrateUser()
142
143 self.conn.commit()
144
145 self.setuplock.set()
146
147 while True:
148 j = self.jobs.get()
149 if j == "quit":
150 self.c.close()
151 self.conn.close()
152 break
153 j.processJob()
154
155 @style.queue
156 def shutdown(self):

Callers

nothing calls this directly

Calls 10

_checkVersionMethod · 0.95
_convertDBMethod · 0.95
_createTablesMethod · 0.95
_migrateUserMethod · 0.95
chmodFunction · 0.90
commitMethod · 0.80
processJobMethod · 0.80
setMethod · 0.45
getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected