Now using black for formatting
This commit is contained in:
@@ -10,10 +10,22 @@ scheduler = AsyncIOScheduler()
|
||||
|
||||
if configGet("post", "mode"):
|
||||
if configGet("use_interval", "posting"):
|
||||
scheduler.add_job(send_content, "interval", seconds=timeparse(configGet("interval", "posting")), args=[app])
|
||||
scheduler.add_job(
|
||||
send_content,
|
||||
"interval",
|
||||
seconds=timeparse(configGet("interval", "posting")),
|
||||
args=[app],
|
||||
)
|
||||
else:
|
||||
for entry in configGet("time", "posting"):
|
||||
dt_obj = datetime.strptime(entry, "%H:%M")
|
||||
scheduler.add_job(send_content, "cron", hour=dt_obj.hour, minute=dt_obj.minute, args=[app])
|
||||
scheduler.add_job(
|
||||
send_content, "cron", hour=dt_obj.hour, minute=dt_obj.minute, args=[app]
|
||||
)
|
||||
|
||||
scheduler.add_job(register_commands, "date", run_date=datetime.now()+timedelta(seconds=10), args=[app])
|
||||
scheduler.add_job(
|
||||
register_commands,
|
||||
"date",
|
||||
run_date=datetime.now() + timedelta(seconds=10),
|
||||
args=[app],
|
||||
)
|
||||
|
Reference in New Issue
Block a user