mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Compare commits
11 commits
3eb1310994
...
b82a547ab3
Author | SHA1 | Date | |
---|---|---|---|
|
b82a547ab3 | ||
|
a50c8e951f | ||
|
2c1e75727d | ||
|
9778204e5d | ||
|
3f2ffa63e5 | ||
|
d3a51cb24e | ||
|
da416534eb | ||
|
7caf605384 | ||
|
40f4d069bf | ||
|
618ce0ddc5 | ||
|
f52f4a0a90 |
8 changed files with 16 additions and 38 deletions
|
@ -60,7 +60,7 @@ export interface BaseNotificationGroupJSON {
|
|||
|
||||
interface NotificationGroupWithStatusJSON extends BaseNotificationGroupJSON {
|
||||
type: NotificationWithStatusType;
|
||||
status: ApiStatusJSON;
|
||||
status_id: string;
|
||||
}
|
||||
|
||||
interface NotificationWithStatusJSON extends BaseNotificationJSON {
|
||||
|
|
|
@ -49,22 +49,15 @@ export const FilteredNotificationsBanner: React.FC = () => {
|
|||
<span>
|
||||
<FormattedMessage
|
||||
id='filtered_notifications_banner.pending_requests'
|
||||
defaultMessage='Notifications from {count, plural, =0 {no one} one {one person} other {# people}} you may know'
|
||||
defaultMessage='From {count, plural, =0 {no one} one {one person} other {# people}} you may know'
|
||||
values={{ count: policy.summary.pending_requests_count }}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className='filtered-notifications-banner__badge'>
|
||||
<div className='filtered-notifications-banner__badge__badge'>
|
||||
{toCappedNumber(policy.summary.pending_notifications_count)}
|
||||
</div>
|
||||
<FormattedMessage
|
||||
id='filtered_notifications_banner.mentions'
|
||||
defaultMessage='{count, plural, one {mention} other {mentions}}'
|
||||
values={{ count: policy.summary.pending_notifications_count }}
|
||||
/>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -300,8 +300,7 @@
|
|||
"filter_modal.select_filter.subtitle": "Use an existing category or create a new one",
|
||||
"filter_modal.select_filter.title": "Filter this post",
|
||||
"filter_modal.title.status": "Filter a post",
|
||||
"filtered_notifications_banner.mentions": "{count, plural, one {mention} other {mentions}}",
|
||||
"filtered_notifications_banner.pending_requests": "Notifications from {count, plural, =0 {no one} one {one person} other {# people}} you may know",
|
||||
"filtered_notifications_banner.pending_requests": "From {count, plural, =0 {no one} one {one person} other {# people}} you may know",
|
||||
"filtered_notifications_banner.title": "Filtered notifications",
|
||||
"firehose.all": "All",
|
||||
"firehose.local": "This server",
|
||||
|
|
|
@ -124,9 +124,9 @@ export function createNotificationGroupFromJSON(
|
|||
case 'mention':
|
||||
case 'poll':
|
||||
case 'update': {
|
||||
const { status, ...groupWithoutStatus } = group;
|
||||
const { status_id: statusId, ...groupWithoutStatus } = group;
|
||||
return {
|
||||
statusId: status.id,
|
||||
statusId,
|
||||
sampleAccountIds,
|
||||
...groupWithoutStatus,
|
||||
};
|
||||
|
|
|
@ -10170,27 +10170,12 @@ noscript {
|
|||
}
|
||||
}
|
||||
|
||||
&__badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 999px;
|
||||
background: var(--background-border-color);
|
||||
color: $darker-text-color;
|
||||
padding: 4px;
|
||||
padding-inline-end: 8px;
|
||||
gap: 6px;
|
||||
font-weight: 500;
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
word-break: keep-all;
|
||||
|
||||
&__badge {
|
||||
background: $ui-button-background-color;
|
||||
color: $white;
|
||||
border-radius: 100px;
|
||||
padding: 2px 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.notification-request {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::LowPriorityDeliveryWorker < ActivityPub::DeliveryWorker
|
||||
sidekiq_options queue: 'pull', retry: 8, dead: false
|
||||
sidekiq_options queue: 'low_priority', retry: 8, dead: false
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ class Scheduler::SuspendedUserCleanupScheduler
|
|||
# Each processed deletion request may enqueue an enormous
|
||||
# amount of jobs in the `pull` queue, so only enqueue when
|
||||
# the queue is empty or close to being so.
|
||||
MAX_PULL_SIZE = 50
|
||||
MAX_QUEUE_SIZE = 50
|
||||
|
||||
# Since account deletion is very expensive, we want to avoid
|
||||
# overloading the server by queuing too much at once.
|
||||
|
@ -19,7 +19,7 @@ class Scheduler::SuspendedUserCleanupScheduler
|
|||
sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 1.day.to_i
|
||||
|
||||
def perform
|
||||
return if Sidekiq::Queue.new('pull').size > MAX_PULL_SIZE
|
||||
return if Sidekiq::Queue.new('low_priority').size > MAX_QUEUE_SIZE
|
||||
|
||||
process_deletion_requests!
|
||||
end
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
- [default, 8]
|
||||
- [push, 6]
|
||||
- [ingress, 4]
|
||||
- [mailers, 2]
|
||||
- [pull]
|
||||
- [mailers, 3]
|
||||
- [pull, 2]
|
||||
- [low_priority]
|
||||
- [scheduler]
|
||||
|
||||
:scheduler:
|
||||
|
|
Loading…
Reference in a new issue