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

Feat db pools eldad #4330

Merged
merged 43 commits into from
Oct 24, 2022
Merged

Feat db pools eldad #4330

merged 43 commits into from
Oct 24, 2022

Conversation

eldadfux
Copy link
Member

@eldadfux eldadfux commented Oct 8, 2022

What does this PR do?

Updated for the database pools PR.

  • Renamed DatabasePool to Pools - no need to include namespace in the name itself.
  • Decouple Utopia libraries from Pools:
    • App::getEnv()
    • App::isDevelopment()
    • Appwrite Exception
    • RedisCache
    • MariaDB
  • Deprecate or adjust Pools::getDatabase() to use generic DSN connections
  • Fix _APP_DB__APP_DB_CONSOLEROOT_PASS to be _APP_DB_CONSOLE
  • Hide _APP_DB_CONSOLE and _APP_DB_PROJECT from docs

Open Questions:

  • Do we have to use Swoole Pool as a dependency or can we be completely independent?

Test Plan

Use existing tests

Related PRs and Issues

#3423

Have you read the Contributing Guidelines on issues?

Yes

app/cli.php Outdated Show resolved Hide resolved
app/init.php Outdated Show resolved Hide resolved
} catch (\Throwable $th) {
Console::error('Queue............disconnected 👎');
$configs = [
'Console.DB' => Config::getParam('pools-console'),
Copy link
Member

Choose a reason for hiding this comment

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

any reason to use the dot in the key names? We haven't used this convention before

Copy link
Member Author

Choose a reason for hiding this comment

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

I felt a space would be weird here because of the format, and camelCase would indicate a code concept while this should be a human readable format 🤔

Copy link
Member

Choose a reason for hiding this comment

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

being an array key I think its valid to use console-db and projects-db or use the same key as the config
pools-console and pools-projects

app/init.php Outdated Show resolved Hide resolved
app/init.php Outdated Show resolved Hide resolved
app/realtime.php Outdated Show resolved Hide resolved
app/realtime.php Outdated Show resolved Hide resolved
Copy link
Member

@christyjacob4 christyjacob4 left a comment

Choose a reason for hiding this comment

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

Looks good. Just some last comments

@eldadfux eldadfux mentioned this pull request Oct 23, 2022
@christyjacob4 christyjacob4 marked this pull request as ready for review October 24, 2022 19:56
@christyjacob4 christyjacob4 merged commit 6f00c98 into feat-db-pools Oct 24, 2022
@stnguyen90 stnguyen90 deleted the feat-db-pools-eldad branch February 14, 2023 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants