Immediate query for custom badge that is updated daily


(Stephen Birarda) #1

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?


#2

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


(Mittineague) #3

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?


(Stephen Birarda) #4

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


#5

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


(Stephen Birarda) #6

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


#7

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?


(Jay Pfaffman) #8

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.


#9

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.


(Jay Pfaffman) #10

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