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

PHRAS-3945 move pusher configuration #4413

Merged
merged 6 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Alchemy/Phrasea/Controller/Prod/DownloadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function listDownloadAsync(Request $request)

$token = $this->getTokenManipulator()->createDownloadToken($this->getAuthenticatedUser(), serialize($list));

$pusher_auth_key =$this->getConf()->get(['download_async', 'enabled'], false) ? $this->getConf()->get(['pusher', 'auth_key'], '') : null;
$pusher_auth_key =$this->getConf()->get(['download_async', 'enabled'], false) ? $this->getConf()->get(['externalservice', 'pusher', 'auth_key'], '') : null;
return new Response($this->render(
/** @uses templates/web/prod/actions/Download/prepare_async.html.twig */
'/prod/actions/Download/prepare_async.html.twig', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public function process(array $payload)
);
try {
$this->pusher = new Pusher(
$this->conf->get(['pusher', 'auth_key'], ''),
$this->conf->get(['pusher', 'secret'], ''),
$this->conf->get(['pusher', 'app_id'], ''),
$this->conf->get(['externalservice', 'pusher', 'auth_key'], ''),
$this->conf->get(['externalservice', 'pusher', 'secret'], ''),
$this->conf->get(['externalservice', 'pusher', 'app_id'], ''),
$options
);
$this->pusher_channel_name = $token->getValue();
Expand Down
15 changes: 5 additions & 10 deletions lib/conf.d/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,7 @@ registration-fields:
required: true
download_async:
enabled: false
pusher:
auth_key: 'pusher-auth_key'
secret: 'pusher-secret'
app_id: 'pusher-app_id'

xsendfile:
enabled: false
type: nginx
Expand Down Expand Up @@ -430,12 +427,10 @@ workers:
- application/pdf
- image/tiff
externalservice:
ginger:
AutoSubtitling:
service_base_url: https://base.uri
token: 39c6011d
transcript_format: text/vtt
subdef_source: preview
pusher:
auth_key: 'pusher-auth_key'
secret: 'pusher-secret'
app_id: 'pusher-app_id'


Console_logger_enabled_environments: [test]
Expand Down