sboesen / remotely-sync

fork of remotely-save with security upgrades
Apache License 2.0
180 stars 7 forks source link

[Bug]: New PQueue is created on every operation #104

Closed kadisonm closed 6 months ago

kadisonm commented 6 months ago

What happened?

A new PQueue is created on every operation (folder creation, delete, upload) causing the status bar to show 3 seperate queues.

Accumilate all the files needed for upload on a single queue. I'll do some testing on this.

What OS are you using?

Windows

What remote cloud services are you using?

Dropbox

Version of the plugin

No response

Version of Obsidian

No response

Using password or not

Ensure no sensitive information

kadisonm commented 6 months ago

Actually now that I'm thinking about it, shouldn't the status bar only be updated for upload/downloads? @sboesen

sboesen commented 6 months ago

I think if you have a lot of folder creations (usually a one-time problem) that should be tracked in the status bar, too - I don't think this is a bulk operation

But there shouldn't be a queue created for each operation. That is odd..

kadisonm commented 6 months ago

But there shouldn't be a queue created for each operation. That is odd..

It's because it loops through each array (operation), then creates a queue for that array and adds uploads to the queue. But this causes the status bar to show three queues in order.

I think if you have a lot of folder creations (usually a one-time problem) that should be tracked in the status bar

I'll have a look at updating the status bar for folder creations and upload/downloads but not deletions.