* Add workspace webhooks and drop the unused automation webhook node. Give workspaces HMAC-signed outgoing webhooks for the post lifecycle, with retry, auto-pause, replay, and live logs, and keep HTTP Request as the only outbound automation node. * Tighten webhook controller and validation after review. Drop the redundant workspace redirects, prune logs without counting, and validate events/status with Rule::enum. * Move leftover webhook UI copy behind i18n. HTTP status phrases, delete-cancel, and validation attribute names were still English literals. * Build the webhook-paused email through Maizzle. The hand-written Blade skipped the shared layout, header, and footer used by the other mail templates. * Cover real webhook dispatch paths and restyle the webhook pages. * Ask for the shared delete keyword when confirming a webhook delete. The endpoint URL is a poor confirm string; posts and assets already use the common "delete" keyword. * Fix webhook review blockers so CI can go green. Drop leftover French automation keys, stop mutating Inertia log props, and show delivered_at instead of created_at. * Close the remaining webhook review gaps. Keep Echo log updates across infinite scroll, align the channel with the policy, persist log ids across retries, and fail unknown automation nodes without throwing. * Stop webhook delivery after disable and record last sent only on success. Queued jobs now skip paused or disabled endpoints unless the user replays, and changing the URL re-pings it first. * Limit webhooks to owners and admins, and encrypt signing secrets. Members can no longer create or inspect outgoing integrations, and secrets stay encrypted at rest. * Cover webhook secret hiding, skip-ping, and failed-delivery edges. * Send the full post on webhooks after labels and platforms are saved. * Fix webhook payloads for integer media ids and type webhook status. * Split the webhook show page into focused components. * Reset live webhook logs when switching endpoints. * Keep the newest webhook logs at the top after live merges. * Cast media item ids to string without the extra scalar check. * Add post.unscheduled webhooks and put the log id on the envelope. Unscheduling is now a first-class event, and receivers can send the delivery id back so we can find the matching log. * Translate webhook event names in the UI. * Make the webhook show page full-width and stop stacking flash toasts. * Translate remaining webhook UI copy in every locale. * Sign webhook pings and drop author email from the payload. * Send signed webhook tests after create instead of pinging on save. Create and update only block private URLs so the receiver can copy the secret first. The show page then sends a signed webhook.test with an object data envelope. * Polish webhook test UX and always mint the dispatch log id in the job. Keep send-test in the actions menu (its own group) and drop the leftover constructor param so retries reuse the serialized id instead of a caller-supplied one.
345 lines
10 KiB
PHP
345 lines
10 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Enums\SocialAccount\Platform;
|
|
use Illuminate\Support\Str;
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Horizon Name
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This name appears in notifications and in the Horizon UI. Unique names
|
|
| can be useful while running multiple instances of Horizon within an
|
|
| application, allowing you to identify the Horizon you're viewing.
|
|
|
|
|
*/
|
|
|
|
'name' => env('HORIZON_NAME'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Horizon Domain
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This is the subdomain where Horizon will be accessible from. If this
|
|
| setting is null, Horizon will reside under the same domain as the
|
|
| application. Otherwise, this value will serve as the subdomain.
|
|
|
|
|
*/
|
|
|
|
'domain' => env('HORIZON_DOMAIN'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Horizon Allowed Emails
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This is a comma-separated list of email addresses that are allowed to
|
|
| access Horizon in non-local environments. Leave empty to deny all.
|
|
|
|
|
*/
|
|
|
|
'allowed_emails' => env('HORIZON_ALLOWED_EMAILS', ''),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Horizon Path
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This is the URI path where Horizon will be accessible from. Feel free
|
|
| to change this path to anything you like. Note that the URI will not
|
|
| affect the paths of its internal API that aren't exposed to users.
|
|
|
|
|
*/
|
|
|
|
'path' => env('HORIZON_PATH', 'horizon'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Horizon Redis Connection
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This is the name of the Redis connection where Horizon will store the
|
|
| meta information required for it to function. It includes the list
|
|
| of supervisors, failed jobs, job metrics, and other information.
|
|
|
|
|
*/
|
|
|
|
'use' => 'default',
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Horizon Redis Prefix
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This prefix will be used when storing all Horizon data in Redis. You
|
|
| may modify the prefix when you are running multiple installations
|
|
| of Horizon on the same server so that they don't have problems.
|
|
|
|
|
*/
|
|
|
|
'prefix' => env(
|
|
'HORIZON_PREFIX',
|
|
Str::slug(env('APP_NAME', 'laravel'), '_').'_horizon:'
|
|
),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Horizon Route Middleware
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| These middleware will get attached onto each Horizon route, giving you
|
|
| the chance to add your own middleware to this list or change any of
|
|
| the existing middleware. Or, you can simply stick with this list.
|
|
|
|
|
*/
|
|
|
|
'middleware' => ['web'],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Queue Wait Time Thresholds
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This option allows you to configure when the LongWaitDetected event
|
|
| will be fired. Every connection / queue combination may have its
|
|
| own, unique threshold (in seconds) before this event is fired.
|
|
|
|
|
*/
|
|
|
|
'waits' => [
|
|
'redis:default' => 60,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Job Trimming Times
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you can configure for how long (in minutes) you desire Horizon to
|
|
| persist the recent and failed jobs. Typically, recent jobs are kept
|
|
| for one hour while all failed jobs are stored for an entire week.
|
|
|
|
|
*/
|
|
|
|
'trim' => [
|
|
'recent' => 60,
|
|
'pending' => 60,
|
|
'completed' => 60,
|
|
'recent_failed' => 10080,
|
|
'failed' => 10080,
|
|
'monitored' => 10080,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Silenced Jobs
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Silencing a job will instruct Horizon to not place the job in the list
|
|
| of completed jobs within the Horizon dashboard. This setting may be
|
|
| used to fully remove any noisy jobs from the completed jobs list.
|
|
|
|
|
*/
|
|
|
|
'silenced' => [
|
|
// App\Jobs\ExampleJob::class,
|
|
],
|
|
|
|
'silenced_tags' => [
|
|
// 'notifications',
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Metrics
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you can configure how many snapshots should be kept to display in
|
|
| the metrics graph. This will get used in combination with Horizon's
|
|
| `horizon:snapshot` schedule to define how long to retain metrics.
|
|
|
|
|
*/
|
|
|
|
'metrics' => [
|
|
'trim_snapshots' => [
|
|
'job' => 24,
|
|
'queue' => 24,
|
|
],
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Fast Termination
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| When this option is enabled, Horizon's "terminate" command will not
|
|
| wait on all of the workers to terminate unless the --wait option
|
|
| is provided. Fast termination can shorten deployment delay by
|
|
| allowing a new instance of Horizon to start while the last
|
|
| instance will continue to terminate each of its workers.
|
|
|
|
|
*/
|
|
|
|
'fast_termination' => false,
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Memory Limit (MB)
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This value describes the maximum amount of memory the Horizon master
|
|
| supervisor may consume before it is terminated and restarted. For
|
|
| configuring these limits on your workers, see the next section.
|
|
|
|
|
*/
|
|
|
|
'memory_limit' => 64,
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Queue Worker Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you may define the queue worker settings used by your application
|
|
| in all environments. These supervisors and settings handle all your
|
|
| queued jobs and will be provisioned by Horizon during deployment.
|
|
|
|
|
*/
|
|
|
|
'defaults' => [
|
|
'supervisor-1' => [
|
|
'connection' => 'redis',
|
|
'queue' => ['default', 'posthog', 'broadcasts'],
|
|
'balance' => 'auto',
|
|
'autoScalingStrategy' => 'time',
|
|
'maxProcesses' => 1,
|
|
'maxTime' => 0,
|
|
'maxJobs' => 0,
|
|
'memory' => 128,
|
|
'tries' => 1,
|
|
'timeout' => 630,
|
|
'nice' => 0,
|
|
],
|
|
|
|
'social-publishing' => [
|
|
'connection' => 'redis',
|
|
'queue' => Platform::enabledQueues(),
|
|
'balance' => 'auto',
|
|
'autoScalingStrategy' => 'time',
|
|
'minProcesses' => 1,
|
|
'maxProcesses' => 3,
|
|
'timeout' => 930,
|
|
'maxTime' => 0,
|
|
'maxJobs' => 0,
|
|
'memory' => 256,
|
|
'tries' => 1,
|
|
'nice' => 0,
|
|
],
|
|
|
|
'ai-assistant' => [
|
|
'connection' => 'redis',
|
|
'queue' => ['ai'],
|
|
'balance' => 'auto',
|
|
'autoScalingStrategy' => 'time',
|
|
'minProcesses' => 1,
|
|
'maxProcesses' => 2,
|
|
'timeout' => 930,
|
|
'maxTime' => 0,
|
|
'maxJobs' => 0,
|
|
'memory' => 512,
|
|
'tries' => 1,
|
|
'nice' => 0,
|
|
],
|
|
|
|
'automations' => [
|
|
'connection' => 'redis',
|
|
'queue' => ['automations'],
|
|
'balance' => 'auto',
|
|
'autoScalingStrategy' => 'time',
|
|
'minProcesses' => 1,
|
|
'maxProcesses' => 3,
|
|
'timeout' => 630,
|
|
'maxTime' => 0,
|
|
'maxJobs' => 0,
|
|
'memory' => 256,
|
|
'tries' => 1,
|
|
'nice' => 0,
|
|
],
|
|
|
|
'webhooks' => [
|
|
'connection' => 'redis',
|
|
'queue' => ['webhooks'],
|
|
'balance' => 'auto',
|
|
'autoScalingStrategy' => 'time',
|
|
'minProcesses' => 1,
|
|
'maxProcesses' => 2,
|
|
'timeout' => 60,
|
|
'maxTime' => 0,
|
|
'maxJobs' => 0,
|
|
'memory' => 256,
|
|
'tries' => 1,
|
|
'nice' => 0,
|
|
],
|
|
],
|
|
|
|
'environments' => [
|
|
'production' => [
|
|
'supervisor-1' => [
|
|
'maxProcesses' => 10,
|
|
'balanceMaxShift' => 1,
|
|
'balanceCooldown' => 3,
|
|
],
|
|
|
|
'social-publishing' => [
|
|
'maxProcesses' => 10,
|
|
'balanceMaxShift' => 1,
|
|
'balanceCooldown' => 3,
|
|
],
|
|
|
|
'ai-assistant' => [
|
|
'maxProcesses' => 5,
|
|
'balanceMaxShift' => 1,
|
|
'balanceCooldown' => 3,
|
|
],
|
|
|
|
'automations' => [
|
|
'maxProcesses' => 5,
|
|
'balanceMaxShift' => 1,
|
|
'balanceCooldown' => 3,
|
|
],
|
|
|
|
'webhooks' => [
|
|
'maxProcesses' => 3,
|
|
'balanceMaxShift' => 1,
|
|
'balanceCooldown' => 3,
|
|
],
|
|
],
|
|
|
|
'local' => [
|
|
'supervisor-1' => [
|
|
'maxProcesses' => 3,
|
|
],
|
|
|
|
'social-publishing' => [
|
|
'maxProcesses' => 3,
|
|
],
|
|
|
|
'ai-assistant' => [
|
|
'maxProcesses' => 2,
|
|
],
|
|
|
|
'automations' => [
|
|
'maxProcesses' => 2,
|
|
],
|
|
|
|
'webhooks' => [
|
|
'maxProcesses' => 1,
|
|
],
|
|
],
|
|
],
|
|
];
|