Skip to content

Unnecessary data in a Job class #69

Closed
@Manriel

Description

@Manriel

Probably, we don't need to push the LogToDb main class into the Job here

public function __construct(protected object $logToDb, protected LogRecord $record)

Passing the class instance into the Job is causing to have an additional data of that class in json-serialized representation of the job in redis/db/whatever job storage it use.

At the same time we always could get a LogToDb class instance right inside the job's handle method without performance cost.

So, right now in a waiting jobs we just waste RAM to store copies of identical data which recoverable without job-specific context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions