Skip to content
Merged
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
16 changes: 8 additions & 8 deletions app/Http/Controllers/WikiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function create(Request $request): \Illuminate\Http\Response {
$dbAssignment = null;

// TODO create with some sort of owner etc?
DB::transaction(function () use ($user, $request, &$wiki, &$dbAssignment, $isSubdomain, $submittedDomain, $rawProfile) {
DB::transaction(function () use ($user, $request, &$wiki, &$dbAssignment, $submittedDomain, $rawProfile) {
$dbVersion = Config::get('wbstack.wiki_db_use_version');
$wikiDbCondition = ['wiki_id' => null, 'version' => $dbVersion];

Expand Down Expand Up @@ -161,15 +161,15 @@ public function create(Request $request): \Illuminate\Http\Response {
if ($rawProfile) {
WikiProfile::create(['wiki_id' => $wiki->id, ...$rawProfile]);
}

// TODO maybe always make these run in a certain order..?
dispatch(new MediawikiInit($wiki->domain, $request->input('username'), $user->email));
// Only dispatch a job to add a k8s ingress IF we are using a custom domain...
if (!$isSubdomain) {
dispatch(new KubernetesIngressCreate($wiki->id, $wiki->domain));
}
});

// TODO maybe always make these run in a certain order..?
dispatch(new MediawikiInit($wiki->domain, $request->input('username'), $user->email));
// Only dispatch a job to add a k8s ingress IF we are using a custom domain...
if (!$isSubdomain) {
dispatch(new KubernetesIngressCreate($wiki->id, $wiki->domain));
}

// dispatch elasticsearch init job to enable the feature
if (Config::get('wbstack.elasticsearch_enabled_by_default')) {
if ($clusterWithoutSharedIndex) {
Expand Down
Loading