Merge pull request #384 from obdagli/fix/grok-async-initial-usage-sync
fix(grok): avoid blocking the first request on initial usage sync
This commit is contained in:
commit
b37ead525c
1 changed files with 4 additions and 1 deletions
|
|
@ -155,8 +155,11 @@ export class GrokApiService {
|
|||
|
||||
async initialize() {
|
||||
if (this.isInitialized) return;
|
||||
try { await this.getUsageLimits(); } catch (error) { logger.warn('[Grok] Initial usage sync failed:', error.message); }
|
||||
this.isInitialized = true;
|
||||
this.getUsageLimits()
|
||||
.catch((error) => {
|
||||
logger.warn('[Grok] Initial usage sync failed:', error.message);
|
||||
});
|
||||
}
|
||||
|
||||
async refreshToken() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue