fix(deploy): update resource timestamp handling in deploy_resource method
This commit is contained in:
@@ -319,9 +319,10 @@ class DeployController extends Controller
|
|||||||
default:
|
default:
|
||||||
// Database resource
|
// Database resource
|
||||||
StartDatabase::dispatch($resource);
|
StartDatabase::dispatch($resource);
|
||||||
$resource->update([
|
|
||||||
'started_at' => now(),
|
$resource->started_at ??= now();
|
||||||
]);
|
$resource->save();
|
||||||
|
|
||||||
$message = "Database {$resource->name} started.";
|
$message = "Database {$resource->name} started.";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,16 +33,13 @@ class Heading extends Component
|
|||||||
public function activityFinished()
|
public function activityFinished()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->database->update([
|
$this->database->started_at ??= now();
|
||||||
'started_at' => now(),
|
$this->database->save();
|
||||||
]);
|
|
||||||
|
|
||||||
if (is_null($this->database->config_hash) || $this->database->isConfigurationChanged()) {
|
if (is_null($this->database->config_hash) || $this->database->isConfigurationChanged()) {
|
||||||
$this->database->isConfigurationChanged(true);
|
$this->database->isConfigurationChanged(true);
|
||||||
$this->dispatch('configurationChanged');
|
|
||||||
} else {
|
|
||||||
$this->dispatch('configurationChanged');
|
|
||||||
}
|
}
|
||||||
|
$this->dispatch('configurationChanged');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user