Skip to content

Commit

Permalink
Merge branch 'master' into hubbub
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachughes committed Dec 12, 2023
2 parents 6004466 + 8c47de1 commit d585f9d
Show file tree
Hide file tree
Showing 21 changed files with 8 additions and 1,179 deletions.
3 changes: 2 additions & 1 deletion chart/templates/apis/contentauthor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ spec:
command:
- php
- artisan
- horizon
- queue:work
- '-v'
{{- include "apis.contentauthor.env" . | indent 10 }}
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ services:
context: ./sourcecode/apis/contentauthor
dockerfile: Dockerfile
target: dev
command: [php, artisan, horizon]
command: [php, artisan, queue:work, -v]
depends_on:
contentauthor-fpm:
condition: service_healthy
Expand Down
18 changes: 0 additions & 18 deletions sourcecode/apis/contentauthor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,6 @@ Create the initial version of all content run the following command
$ CACHE_DRIVER=file php artisan cerpus:init-versioning
```

# Starting the internal queue worker

[Laravel Horizon](https://laravel.com/docs/6.x/horizon) will handle all the internal queues.

See `config/horizon.php` for config options if you want to modify/tweak the set up.

Start horizon like this:

```bash
$ php artisan horizon
```

Be sure to set `QUEUE_DRIVER=redis` in `.env`.

[In production use Supervisor to start and monitor Horizon](https://laravel.com/docs/6.x/horizon#deploying-horizon).

For development purposes you can use the `sync` queue driver.

## Enabling context collaboration message processing

In .env
Expand Down
6 changes: 0 additions & 6 deletions sourcecode/apis/contentauthor/app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ protected function schedule(Schedule $schedule)
->withoutOverlapping()
->onOneServer()
->appendOutputTo($outputLocation);

$schedule->command('horizon:snapshot')
->everyFiveMinutes()
->withoutOverlapping()
->onOneServer()
->appendOutputTo($outputLocation);
}

protected function commands()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public function update(H5PStorageRequest $request, H5PContent $h5p, H5PCore $cor
return $file->state === H5PFile::FILE_CLONEFILE;
});
if ($filesToProcess->isNotEmpty()) {
H5PFilesUpload::dispatch($content['id'])->onQueue("ca-multimedia");
H5PFilesUpload::dispatch($content['id']);
$responseValues['statuspath'] = route('api.get.filestatus', ['requestId' => $request->header('X-Request-Id')]);
}

Expand Down Expand Up @@ -531,7 +531,7 @@ public function store(H5PStorageRequest $request): Response|JsonResponse
/** @var Collection $filesToProcess */
$filesToProcess = H5PFile::ofFileUploadFromContent($content->id)->get();
if ($filesToProcess->isNotEmpty()) {
H5PFilesUpload::dispatch($content['id'])->onQueue("ca-multimedia");
H5PFilesUpload::dispatch($content['id']);
$responseValues['statuspath'] = route('api.get.filestatus', ['requestId' => $request->header('X-Request-Id')]);
}
return response()->json($responseValues, Response::HTTP_CREATED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private function triggerVideoConvert($fromId, $toId, $file)
'source_file' => $file,
]);

PingVideoApi::dispatch($h5pContentsVideo, app(VersionClient::class))->onQueue('streamps_messages');
PingVideoApi::dispatch($h5pContentsVideo, app(VersionClient::class));
}

private function getFilePrefix($contentId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HandleExport
public function handle(H5PWasSaved $event)
{
if (config('feature.export_h5p_on_save')) {
ExportH5P::dispatch($event->h5p->refresh())->onQueue('h5p-export');
ExportH5P::dispatch($event->h5p->refresh());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ public function boot()
*/
public function register()
{
if ($this->app->environment() !== 'production') {
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
}

$this->app->singleton(CredentialStoreInterface::class, fn () => new Credentials(
config('app.consumer-key'),
config('app.consumer-secret'),
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion sourcecode/apis/contentauthor/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"h5p/h5p-core": "dev-master#0a82667e00175dea55e37ad8bbebedbfed25b5b6",
"h5p/h5p-editor": "dev-master#0365b081efa8b55ab9fd58594aa599f9630268f6",
"laravel/framework": "^9.17",
"laravel/horizon": "^5.7",
"laravel/tinker": "^2.6",
"laravel/ui": "^3.3",
"laravel/vapor-core": "^2.33",
Expand Down
79 changes: 1 addition & 78 deletions sourcecode/apis/contentauthor/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sourcecode/apis/contentauthor/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\HorizonServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\H5PServiceProvider::class,

Expand Down
Loading

0 comments on commit d585f9d

Please sign in to comment.