Spreds PRO said 3 months ago on Processing Large Jobs :
When calling Countries::ImportJob, couldn’t you just pass blob instead of blob.signed_id, and let GlobalId find the blob record? 

David Kimura PRO said 3 months ago on Processing Large Jobs :
You can, but typically, I don't like passing "complex" objects into background jobs as parameters. I know that Global Id is just a string and that would work, but it always feels better to be a bit more explicit with what I'm passing instead of passing an Object which gets converted into a String. So, I think it may be more of a personal choice/style.

Sleede PRO said about 1 month ago on Processing Large Jobs :
Thanks for this episode!

As a suggestion to optimize this further, I would use "upsert_all" to insert all countries with one sql query and delegate to another job the download of the flags. The one job per country seems like a giant N+1 query to me.
Obviously, there is no need to optimize so much if theses imports happen only from time to time.

Login to Comment