mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
Add some changes for webhook
This commit is contained in:
parent
30d66ef3a8
commit
70ccb3cf25
2 changed files with 3 additions and 3 deletions
|
@ -107,7 +107,7 @@ def get_tracker_mails(tracker_uuid):
|
|||
return list(r_serv_tracker.smembers('tracker:mail:{}'.format(tracker_uuid)))
|
||||
|
||||
def get_tracker_webhook(tracker_uuid):
|
||||
return r_serv_tracker.hget('tracker:{}'.format(tracker_uuid), 'webhook')
|
||||
return r_serv_tracker.hget('tracker:webhook:{}'.format(tracker_uuid))
|
||||
|
||||
def get_tracker_uuid_sources(tracker_uuid):
|
||||
return list(r_serv_tracker.smembers(f'tracker:sources:{tracker_uuid}'))
|
||||
|
@ -472,7 +472,7 @@ def create_tracker(tracker, tracker_type, user_id, level, tags, mails, descripti
|
|||
for source in sources:
|
||||
# escape source ?
|
||||
r_serv_tracker.sadd(f'tracker:sources:{tracker_uuid}', escape(source))
|
||||
|
||||
r_serv_tracker.sadd(f'tracker:webhook:{tracker_uuid}', webhook)
|
||||
# toggle refresh module tracker list/set
|
||||
r_serv_tracker.set('tracker:refresh:{}'.format(tracker_type), time.time())
|
||||
if tracker_type != old_type: # toggle old type refresh
|
||||
|
|
|
@ -375,7 +375,7 @@ def get_term_mails(term_uuid):
|
|||
return list(r_serv_term.smembers('tracker:mail:{}'.format(term_uuid)))
|
||||
|
||||
def get_term_webhook(term_uuid):
|
||||
return list(r_serv_term.hget('tracker:webhook:{}'.format(term_uuid)))
|
||||
return r_serv_term.hget('tracker:webhook:{}'.format(term_uuid))
|
||||
|
||||
def add_tracked_item(term_uuid, item_id, item_date):
|
||||
# track item
|
||||
|
|
Loading…
Reference in a new issue