mirror of
https://github.com/nikdoof/NextAction.git
synced 2025-12-13 17:52:17 +00:00
Add "onetime" option to force a single sync only
This commit is contained in:
@@ -45,6 +45,7 @@ def main():
|
||||
parser.add_argument('--serial_suffix', default='_')
|
||||
parser.add_argument('--hide_future', help='Hide future dated next actions until the specified number of days',
|
||||
default=7, type=int)
|
||||
parser.add_argument('--onetime', help='Update Todoist once and exit', action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Set debug
|
||||
@@ -131,6 +132,9 @@ def main():
|
||||
item.update(labels=labels)
|
||||
|
||||
api.commit()
|
||||
|
||||
if args.onetime:
|
||||
break
|
||||
logging.debug('Sleeping for %d seconds', args.delay)
|
||||
time.sleep(args.delay)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user