Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Add exponential backoff for job status polling#6

Merged
ujovlado merged 3 commits into
mainfrom
AJDA-998-ondra
Aug 27, 2025
Merged

Add exponential backoff for job status polling#6
ujovlado merged 3 commits into
mainfrom
AJDA-998-ondra

Conversation

@ondrajodas
Copy link
Copy Markdown
Contributor

Comment thread src/Client.php Outdated

sleep(1);
// 10, 20, 40, 80, 160, 320, 640, 1000ms (max)
$waitMilliseconds = min(pow(2, $tries)*10, 1000);
Copy link
Copy Markdown
Contributor Author

@ondrajodas ondrajodas Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • nevím, možná by to tu stačilo 100, 200, 400, 800, 1000m
  • nebo začínat trochu dál s tou řadou 110, 120, 140, 180, 260, 320, 740, 1000ms

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no těch 10 je asi dost málo, začal bych tak aspoň 50 nebo 70, těch 100 už je možná zase i hodně, protože do 2 kontroly uběhne 300 ms a do 3 kontroly uběhne už 700ms

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, přičteme k tomu vždy 50, tak to začne na 60ms :)

@ujovlado ujovlado force-pushed the ondra-improvements branch from fcafebf to 9bf9729 Compare August 27, 2025 07:06
Base automatically changed from ondra-improvements to main August 27, 2025 07:13
@ujovlado
Copy link
Copy Markdown
Contributor

@ondrajodas please rebase, there are some conflicts.

@ondrajodas
Copy link
Copy Markdown
Contributor Author

@ujovlado done, v mém rebase žádné konflikty nebyly :D

@ujovlado
Copy link
Copy Markdown
Contributor

Github 🤷

@ondrajodas ondrajodas requested a review from ujovlado August 27, 2025 07:21
@ujovlado ujovlado merged commit 1d47225 into main Aug 27, 2025
1 check passed
@ujovlado ujovlado deleted the AJDA-998-ondra branch August 27, 2025 07:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants