Skip to content

Conversation

@timacdonald
Copy link
Member

Moves update handling to a concern of the storage driver itself.

Any first party jobs would have a dedicated implementation.

Users can add additional implementations for their own updates, and even override the built in handlers.

// service provider

use Laravel\Pulse\Storage\Database

$this->app[Database::class]->handleUpdateUsing(function (MyUpdateClass $update) {
    $storage->connection()->etc();
});

$now = new CarbonImmutable();

if ($cache->get('laravel:pulse:restart') !== $lastRestart) {
if ($lastRestart !== $cache->get('laravel:pulse:restart')) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pint did this in the GH workflow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... it almost feels like it created a Yoda rather than removing it, but maybe my understanding of Yodas is incomplete.

$now = new CarbonImmutable;

if ($cache->get('laravel:pulse:restart') !== $lastRestart) {
if ($lastRestart !== $cache->get('laravel:pulse:restart')) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pint did this in the GH workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants