Skip to content

Queue job should use default Job traits #41

@Gummibeer

Description

@Gummibeer
Contributor

By default a Laravel Job uses Dispatchable, InteractsWithQueue, Queueable, SerializesModels.
The queue job provided by the package should use all of them.

  • Dispatchable: will allow to let the job dispatch itself
  • InteractsWithQueue: is optional sugar on the cake
  • Queueable: will allow to define the queue and connection of the job
  • SerializesModels: should be required because the job accepts and handles an eloquent model

Activity

freekmurze

freekmurze commented on Aug 6, 2020

@freekmurze
Member

Feel free to PR improvements around this. It might also be nice to let the user, in the config file, specify the job class to be used

Gummibeer

Gummibeer commented on Aug 6, 2020

@Gummibeer
ContributorAuthor

Because the user has to self dispatch the job I don't see any need for a config value. There isn't any controller or something dispatching the job inside the package.
The only useful thing in config would be to define the queue and connection.
Will open a PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @freekmurze@Gummibeer

      Issue actions

        Queue job should use default Job traits · Issue #41 · spatie/laravel-personal-data-export