Skip to content

database connection does probably not work very well due to threading #9

@hugobuddel

Description

@hugobuddel

Most of the time the database queries error out with

Querying archive (all items)…
Querying archive…
Query failed: You are not connected to a database
Found 0 item(s).

This is probably because of the threading. That is, UploadWorker, QueryWorker, and DownloadWorker are QThread subclasses.

Threading is in theory possible, but you should do it correctly, and I forgot how to exactly do that.

I think you need to do this in every new thread:

from common.config.Profile import profiles
profiles.create_profile()

from common.database.Database import database
database.connect()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions