birarda
(Stephen Birarda)
Avril 15, 2016, 4:34
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?
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 « J'aime »
birarda
(Stephen Birarda)
Avril 15, 2016, 9:52
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.
Only way is to go into sidekiq and manually trigger the badge grant job as far as I’m aware
1 « J'aime »
birarda
(Stephen Birarda)
Avril 15, 2016, 10:10
6
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 « J'aime »
pfaffman
(Jay Pfaffman)
Avril 17, 2016, 4:02
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.
1 « J'aime »
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.
pfaffman
(Jay Pfaffman)
Avril 18, 2016, 10:36
10
Oops. Thanks, @mikechristopher . I missed that part of the thread.