-
Notifications
You must be signed in to change notification settings - Fork 128
[QUAD] Enhancement: Reactivating ftrack user while he has active deadline jobs #6298
base: develop
Are you sure you want to change the base?
Conversation
}, | ||
{ | ||
"type": "label", | ||
"value": "The following jobs from this user are currently active " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
# Re-activate the account | ||
user['is_active'] = True | ||
session.commit() | ||
self.log.info("the user {} has been re-activated".format(user['username'])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
return | ||
if "isactive" not in entity_info.get('changes', {}): | ||
return | ||
if entity_info['changes']['isactive'].get('new') != False: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comparison to False should be 'if cond is not False:' or 'if cond:'
class KeepUserActiveForDeadline(BaseEvent): | ||
|
||
def launch(self, session, event): | ||
"""Ensure the user stays active while having ongoing job(s) in the Deadline.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
@@ -0,0 +1,98 @@ | |||
import ftrack_api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ftrack_api' imported but unused
No description provided.