birarda
(Stephen Birarda)
15.Апрель.2016 16:34:35
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 лайка
birarda
(Stephen Birarda)
15.Апрель.2016 21:52:55
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 лайк
birarda
(Stephen Birarda)
15.Апрель.2016 22:10:09
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 лайка
pfaffman
(Jay Pfaffman)
17.Апрель.2016 16:02:43
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 лайк
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)
18.Апрель.2016 10:36:35
10
Oops. Thanks, @mikechristopher . I missed that part of the thread.