Immediate query for custom badge that is updated daily

We’re adding a custom badge that will update daily (though it doesn’t really need to, it’s granted to all users created before today).

I’m wondering - when I save the badge will it trigger the initial query or will we need to wait for the “Update Daily” job to trigger?

I believe you need to wait for the daily sidekiq job to trigger it

There are several “Triggers”

  • Update daily
  • When a user acts on post
  • When a user edits or creates a post
  • When a user changes trust level
  • When a user is edited or created
  • After a post is processed

Maybe one of those would be more suitable for you?

إعجابَين (2)

I’m fine with it triggering daily normally, I just want to know if there’s a way to fire the first grant manually.

Only way is to go into sidekiq and manually trigger the badge grant job as far as I’m aware

إعجاب واحد (1)

Yeah, that would be my first move but we’re happily on a managed instance now.

I have that exact same problem sadly

Team would it be possible to build in a trigger which runs the badge grant job upon saving a new or edited badge instance?

3 إعجابات

Go to

 https://YOURHOST/sidekiq/scheduler

Search for “badge” to find Jobs::BadgeGrant and click the trigger button. There’s a Jobs::ProcessBadgeBacklog too, but I’ve never needed it to trigger new badges.

إعجاب واحد (1)

Hi @pfaffman
I believe the problem @birarda is having is that he doesn’t have access to sidekiq as it is a hosted site. Multi site installations now have access to sidekiq removed apart from the master site.

Oops. Thanks, @mikechristopher. I missed that part of the thread.