mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 14:59:02 +00:00
Slots can be updated without removing & adding
This commit is contained in:
@@ -304,6 +304,14 @@ class Database:
|
||||
|
||||
return [task.CrawlServer(r[0], r[1], r[2], r[3], r[4]) for r in cursor.fetchall()]
|
||||
|
||||
def update_crawl_server(self, server_id, url, name, slots):
|
||||
|
||||
with sqlite3.connect(self.db_path) as conn:
|
||||
cursor = conn.cursor()
|
||||
|
||||
cursor.execute("UPDATE CrawlServer SET url=?, name=?, slots=? WHERE id=?", (url, name, slots, server_id))
|
||||
conn.commit()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user