mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
update job killer
This commit is contained in:
parent
b364cc443f
commit
aafd55bd22
1 changed files with 8 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import sys
|
||||
import argparse
|
||||
import logging
|
||||
import json
|
||||
|
||||
from pype.vendor import ftrack_api
|
||||
from pype.ftrack import BaseAction
|
||||
|
|
@ -37,14 +38,18 @@ class JobKiller(BaseAction):
|
|||
).all()
|
||||
|
||||
items = []
|
||||
import json
|
||||
|
||||
item_splitter = {'type': 'label', 'value': '---'}
|
||||
for job in jobs:
|
||||
data = json.loads(job['data'])
|
||||
try:
|
||||
data = json.loads(job['data'])
|
||||
desctiption = data['description']
|
||||
except Exception:
|
||||
desctiption = '*No description*'
|
||||
user = job['user']['username']
|
||||
created = job['created_at'].strftime('%d.%m.%Y %H:%M:%S')
|
||||
label = '{} - {} - {}'.format(
|
||||
data['description'], created, user
|
||||
desctiption, created, user
|
||||
)
|
||||
item_label = {
|
||||
'type': 'label',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue