QueueableJob Naming Convention #12
Replies: 5 comments
-
Good idea! Will trt to collect some votes on this from our Slack workspace and move this to Ideas issue board. |
Beta Was this translation helpful? Give feedback.
-
How about Prefix "Queueable" or "Queue"? I would certainly organize these types of jobs into a separate folder anyway to avoid mixing things or accidentally editing the wrong file. |
Beta Was this translation helpful? Give feedback.
-
Hello, Thank you for your response. Distinguishing the job from a queuable job by name convention is a good idea. However, why do we need to let the job itself decide whether it is queuable or not? Why not make every job as a queuable job and let the feature decide whether it should run this job in a queue or synchronously? For example: By this, you can have a job that can be run in a queue or synchronously, and the decision of that is made by the feature. In addition, it would be clear, readable, and predictable. |
Beta Was this translation helpful? Give feedback.
-
And of course, I would be happy to contribute to this awesome project. |
Beta Was this translation helpful? Give feedback.
-
I like that idea. That might give all Jobs some extra functionality. |
Beta Was this translation helpful? Give feedback.
-
Problem:
Currently, when creating a queueable job using the command:
make:job --queue LogUserSearch user
The job class name will be as follows: LogUserSearchJob
Suggestion:
I would suggest changing the naming convention of queueable jobs to something like QueueableJob or QJob (LogUserSearchQueueableJob, or LogUserSearchQJob).
By this, the code will be more readable and clear. In addition, the developers will be aware that this job is queuable and hence it will run asynchronously.
Beta Was this translation helpful? Give feedback.
All reactions