Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
🥺
conduwuit
Commits
7e2a1549
Commit
7e2a1549
authored
10 months ago
by
🥺
Committed by
🥺
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
use function comments for lsp here
Signed-off-by:
strawberry
<
strawberry@puppygock.gay
>
parent
e226046e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.rs
+21
-20
21 additions, 20 deletions
src/main.rs
with
21 additions
and
20 deletions
src/main.rs
+
21
−
20
View file @
7e2a1549
...
...
@@ -333,19 +333,20 @@ fn init_sentry(config: &Config) -> sentry::ClientInitGuard {
))
}
// We need to store a reload::Handle value, but can't name it's type explicitly
// because the S type parameter depends on the subscriber's previous layers. In
// our case, this includes unnameable 'impl Trait' types.
//
// This is fixed[1] in the unreleased tracing-subscriber from the master branch,
// which removes the S parameter. Unfortunately can't use it without pulling in
// a version of tracing that's incompatible with the rest of our deps.
//
// To work around this, we define an trait without the S paramter that forwards
// to the reload::Handle::reload method, and then store the handle as a trait
// object.
//
// [1]: https://github.com/tokio-rs/tracing/pull/1035/commits/8a87ea52425098d3ef8f56d92358c2f6c144a28f
/// We need to store a reload::Handle value, but can't name it's type explicitly
/// because the S type parameter depends on the subscriber's previous layers. In
/// our case, this includes unnameable 'impl Trait' types.
///
/// This is fixed[1] in the unreleased tracing-subscriber from the master
/// branch, which removes the S parameter. Unfortunately can't use it without
/// pulling in a version of tracing that's incompatible with the rest of our
/// deps.
///
/// To work around this, we define an trait without the S paramter that forwards
/// to the reload::Handle::reload method, and then store the handle as a trait
/// object.
///
/// [1]: <https://github.com/tokio-rs/tracing/pull/1035/commits/8a87ea52425098d3ef8f56d92358c2f6c144a28f>
trait
ReloadHandle
<
L
>
{
fn
reload
(
&
self
,
new_value
:
L
)
->
Result
<
(),
reload
::
Error
>
;
}
...
...
@@ -480,13 +481,13 @@ fn init_tracing(config: &Config) -> (LogLevelReloadHandles, TracingFlameGuard) {
(
LogLevelReloadHandles
::
new
(
reload_handles
),
flame_guard
)
}
// This is needed for opening lots of file descriptors, which tends to
// happen more often when using RocksDB and making lots of federation
// connections at startup. The soft limit is usually 1024, and the hard
// limit is usually 512000; I've personally seen it hit >2000.
//
// * https://www.freedesktop.org/software/systemd/man/systemd.exec.html#id-1.12.2.1.17.6
// * https://github.com/systemd/systemd/commit/0abf94923b4a95a7d89bc526efc84e7ca2b71741
//
/
This is needed for opening lots of file descriptors, which tends to
//
/
happen more often when using RocksDB and making lots of federation
//
/
connections at startup. The soft limit is usually 1024, and the hard
//
/
limit is usually 512000; I've personally seen it hit >2000.
//
/
//
/
*
<
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#id-1.12.2.1.17.6
>
//
/
*
<
https://github.com/systemd/systemd/commit/0abf94923b4a95a7d89bc526efc84e7ca2b71741
>
#[cfg(unix)]
fn
maximize_fd_limit
()
->
Result
<
(),
nix
::
errno
::
Errno
>
{
use
nix
::
sys
::
resource
::{
getrlimit
,
setrlimit
,
Resource
::
RLIMIT_NOFILE
as
NOFILE
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment