This is more of a question on the difference between Elixir’s task supervisor and Ruby’s sidekiq - Typically when backgrounding a job via sidekiq, it is recommended to pass ids rather than full objects because of the way sidekiq serializes. (see Best Practices · sidekiq/sidekiq Wiki · GitHub). Is this an issue we need to worry about with the TaskSupervisor, or is it common to pass full objects?
To your specific question: you can pass anything to a
Task because it doesn’t go through any persistent storage etc
That’s also why
TaskSupervisor isn’t AT ALL comparable to a job-scheduling system like Sidekiq; it doesn’t have any of the features (durability, retries, etc) that you’d expect.
Oban is a better comparison to Sidekiq, and in that case similar restrictions apply because the job’s
args are put into a Postgres JSONB column.