Combining data from scheduled background jobs and running in 1 job

Tags: #<Tag:0x00007fc90d4cf8f0> #<Tag:0x00007fc90d4cf828>

Hi,

In our application, we create/update hundreds of order in background jobs and each hangfire job create/update 1 single order. These updates are received from webhook so we cannot combine this data before creating a background job.

We get hundreds of webhook jobs in a minute that triggers hundreds of background jobs. Is it possible to add a delay of 5 min before processing the jobs and combine data from all these jobs and run a separate job that will do the operation in 1 single job?

If we were to process 10,000 jobs, for us, this means sending 10,000 SQL queries to db.
But if we can do it in 1, we only send 1 query and a just few more to delete the jobs.
Super performance optimization for us :slight_smile: