-
-
Notifications
You must be signed in to change notification settings - Fork 39
use recomended hash prefix for task name #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
hey @marickvantuil can I please have feedback on this?
Thanks for the PR! Great idea, which has got me thinking...
Initially, a custom task name was added in this pull request to make it more clear which task is in the queue. While I like that, I value the performance of inserting tasks more. I'm currently inclined to remove the $task->setName(...) (and thereby lose the task deduplication feature in Cloud Tasks) because Laravel also has task deduplication and it's more powerful.
The downside is that the task names are less readable. But to be honest, this is not very readable either 😛 :
5f4dcc3b5aa765d61d8327deb882cf99-Tests-Support-SimpleJob-f47ac10b-58cc-4372-a567-0e02b2c3d479
What do you think? @ted-selig-five9
I think it would be worth it to do it like that too, I can try to implement that.
closing this and will try to work on #141 instead
In
google/cloud-tasks/src/V2/Gapic/CloudTasksGapicClient.phpthe createTask docs sayI'm interpreting this as meaning that making the md5(timestamp) as the prefix will be a performance increase because google can search for duplicate task names quicker.