Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Discord Import getting stuck #4681

Merged
merged 2 commits into from
Feb 7, 2024
Merged

Conversation

jrainville
Copy link
Member

Fixes status-im/status-desktop#13438 and status-im/status-desktop#13439

The official problem to the hanging was that the timestamp format used in the code didn't support - time zones, like -4.
Using the default format from the time library fixes it.

The bigger problem however was that the progress got stuck at 75% in case of that type of error. Since the messages array ended up being empty because all the timestamps were "wrong", the progress missed the 25% needed that would have been done with a loop.
I guess if you imported a channel with no messages, you'd also have run in that issue.

The solution I found is to set the progress to 100% for messages if there are no messages. The errors still show.

I also cover our asses in case another problem like this happens again with another task and make sure all tasks are set to 100% if we end up reaching the end of the process. That way, the user knows that we actually finished and can check the errors to either try again or leave it as is.

The importer didn't like `-` time zones like `-4`. Using the standard date format makes it work.
@status-im-auto
Copy link
Member

status-im-auto commented Feb 6, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ eb85c94 #1 2024-02-06 22:21:11 ~2 min linux 📦zip
✔️ eb85c94 #1 2024-02-06 22:23:32 ~5 min android 📦aar
✔️ eb85c94 #1 2024-02-06 22:24:06 ~5 min ios 📦zip
✔️ eb85c94 #1 2024-02-06 22:56:37 ~38 min tests 📄log

@jrainville jrainville merged commit 18e7b6c into develop Feb 7, 2024
7 checks passed
@jrainville jrainville deleted the fix/discord-import-stuck branch February 7, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants