diff options
author | Robert Göhler <github@ghlr.de> | 2024-06-28 21:47:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 21:47:55 +0200 |
commit | 4a42e0772df76cf64914d8897cd4889f6f01d2cd (patch) | |
tree | 7831f160b945476bb12260a8bce0baba1b1b2bf3 /phabricator_tasks/tasks.py | |
parent | ddd82003e47f918bb259d966ed329e4e108ff4d3 (diff) | |
parent | d035630de40a6bc52e6f625dab9e51d4a509fc6d (diff) | |
download | vyos-infrastructure-4a42e0772df76cf64914d8897cd4889f6f01d2cd.tar.gz vyos-infrastructure-4a42e0772df76cf64914d8897cd4889f6f01d2cd.zip |
Merge pull request #4 from rebortg/main
Fix python import for github action
Diffstat (limited to 'phabricator_tasks/tasks.py')
-rw-r--r-- | phabricator_tasks/tasks.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phabricator_tasks/tasks.py b/phabricator_tasks/tasks.py index bdaa5ce..fd76f69 100644 --- a/phabricator_tasks/tasks.py +++ b/phabricator_tasks/tasks.py @@ -9,7 +9,7 @@ implement Tasks checks and workflows on vyos.dev import argparse import json -from phabricator_tasks.get_task_data import get_task_data, close_task, unassign_task +from get_task_data import get_task_data, close_task, unassign_task from datetime import datetime, timedelta parser = argparse.ArgumentParser() @@ -21,8 +21,8 @@ args = parser.parse_args() TOKEN = args.token DRYRUN = args.dry # DRYRUN = True -UMASIGN_AFTER_DAYS = 90 -UMASIGN_AFTER_DAYS = timedelta(days=UMASIGN_AFTER_DAYS) +UNASSIGN_AFTER_DAYS = 90 +UNASSIGN_AFTER_DAYS = timedelta(days=UNASSIGN_AFTER_DAYS) NOW = datetime.now() if DRYRUN: @@ -47,10 +47,10 @@ for task in tasks: ''' - # unassign tasks with no process after UMASIGN_AFTER_DAYS + # unassign tasks with no process after UNASSIGN_AFTER_DAYS if task['assigned_user'] and task['assigned_time']: delta = NOW - datetime.fromtimestamp(int(task['assigned_time'])) - if delta > UMASIGN_AFTER_DAYS: + if delta > UNASSIGN_AFTER_DAYS: if task['task_status'] != 'open': if DRYRUN: print(f'dryrun: T{task["task_id"]} with status {task['task_status']} would be unassigned after {delta.days} days') |